Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9255673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:45:51+00:00 2026-06-18T11:45:51+00:00

I created a JaxWs service. User is trying to call it with PHP client,

  • 0

I created a JaxWs service. User is trying to call it with PHP client, the only parm is a string. When I use Eclipse Web service browser (tester) it was fine. When the user tries with PHP I recieve a null parm in the method. I haven’t done any customizing to wsdl or code. Thanks in advance for any pointers…

Method

    @WebService(endpointInterface = "my.endpoint.class")
    public class ExternalReportsImpl implements ExternalReports {
private org.w3c.dom.Document doc;
@Resource
private WebServiceContext context;
private enum Types {
    tfbData, tfbRate, tfbSupport, tfbMakes, tfbVin, tfbSave, tfbRetrieve;
}
@Override

public String getReports(String xmlSource){
    XmlHelper xh;
    SupportTables support =  new SupportTables();
    Connection con = null;  
    Policy policy  = null;
    String schema  = "";
    String ret     = "";
    ServletContext servletContext = (ServletContext)   context.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
    try {
        xh = new XmlHelper();
        doc = xh.loadDoc(xmlSource);
             }

WSDL Snippet

<message name="getReports"><part name="parameters" element="tns:getReports"/></message><message name="getReportsResponse"><part name="parameters" element="tns:getReportsResponse"/></message><portType name="ExternalReports"><operation name="getReports"><input wsam:Action="http://my.class/ExternalReports/getReportsRequest" message="tns:getReports"/><output wsam:Action="http://my.class/ExternalReports/getReportsResponse" message="tns:getReportsResponse"/></operation></portType>

PHP CLIENT

   error_reporting(E_ALL);


    $url = 'http://my.endpoint/ExternalReportsWebService?wsdl';

    $client = new SoapClient($url);

    class getReports {
  function __construct($arg0) {
    $this->getReports = $arg0;
}
    }

   class getReportsResponse {
function __construct($arg0='') {
    $this->getReportsResponse = $arg0;
}
     }

     //$GR = new getReports(file_get_contents("test/test.xml") );
     $GR = new getReports("test") );
     $GRR = new getReportsResponse();

      $report = new SoapVar( $GR  , SOAP_ENC_OBJECT, 'getReports', $url);
      $response = new SoapVar( $GRR  , SOAP_ENC_OBJECT, 'getReportsResponse', $url);

      echo nl2br(htmlspecialchars(print_r($client->getReports($report, $response), true)));

Add this code to PHP CLIENT

     echo "<br> LAST REQUEST <br>"  ;
     echo $client->__getLastRequest();
     echo " <br> Functions <br>"  ;
     echo $client->__getFunctions();
     echo " <br> Types <br>"  ;
     echo $client->__getTypes();
     echo "<br> Request headers <br>"  ;
     echo $client->__getLastRequestHeaders();

CLIENT TRACE RESULTS

    LAST REQUEST
        TEST
    Functions
       Array
    Types
       Array
    Request headers
       POST /myApp/ExternalReportsWebService HTTP/1.1 Host: localhost:8080          Connection: Keep-Alive User-Agent: PHP-SOAP/5.3.14 Content-Type: text/xml; charset=utf-8 SOAPAction: "" Content-Length: 531 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:45:52+00:00Added an answer on June 18, 2026 at 11:45 am

    Found this link

    http://www.lampjunkie.com/2010/03/get-phps-soapclient-to-speak-with-javas-jax-ws/

    My schema has named params

     <xs:schema version="1.0" targetNamespace="http://my.namespace/"><xs:element name="getReports" type="tns:getReports"/><xs:element name="getReportsResponse" type="tns:getReportsResponse"/><xs:complexType name="getReports"><xs:sequence><xs:element name="arg0" type="xs:string" minOccurs="0"/></xs:sequence></xs:complexType><xs:complexType name="getReportsResponse"><xs:sequence><xs:element name="return" type="xs:string" minOccurs="0"/></xs:sequence></xs:complexType></xs:schema> 
    

    had to add

    $addRequest = new stdClass();
    $addRequest->argO = "String I was sending";
    $response = $client->add($addRequest);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a simple web service in eclipse. First i created an
I created a web service client and I am receiving the following error when
guy's, pleeaseee help me!!! I created a web service which use UserNameToken Profile security
I'm trying to consume a web service created in .NET which needs SOAP authentication.
I have created a JAX-WS client within eclipse that will communicate with a web
I am trying to use SharePoint Web service to retrieve list changes but there
I am trying to create a web service client using RAD 7.5 using JAX-WS
I've created a stand-alone web services client in Java. I'm able to generate the
I am unable to create a Web Service Client in my NetBeans Web Application
In IntelliJ 10.0.3 I use the menu option new web service and this generates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.