users@jax-rpc.java.net

Re: Axis and Java WSDP WebServices

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Tue, 24 Aug 2004 11:38:49 -0700

Marcus,
The problem is that the element JobState in your response message should
be named getJobStateReturn as that is the part name
in the output message. So the response should look like:

<SOAP-ENV:Envelope
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:env="http://www.w3.org/2003/05/soap-envelope"
 xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/">
 <SOAP-ENV:Body>
  <ns1:getJobStateResponse
   xmlns:ns1="http://localhost/dobbin4web"
   SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
   <getJobStateReturn xsi:type="ns2:JobState" xmlns:ns2="http://soapinterop.org/xsd">
    <state xsi:type="xsd:int">0</state>
    <message xsi:type="xsd:string">Noch nicht Implemementiert</message>
   </getJobStateReturn>
  </ns1:getJobStateResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The wsdl part looks li



Marcus Tillmanns wrote:

>Sure,
>
>Im not sure if its all copliant, But I somehow expect Axis to be a little
>compliant :) Anyway, here is the request (not from Java but php nuSoap, I
>don't think that matter greatly, cause request works always):
>
><?xml version="1.0" encoding="ISO-8859-1"?>
><SOAP-ENV:Envelope
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:si="http://soapinterop.org/xsd"
> xmlns:nu="http://dobbin/axis/Dobbin4Web">
> <SOAP-ENV:Body>
> <nu:getJobState xmlns:nu="http://dobbin/axis/Dobbin4Web">
> <jobid xsi:type="xsd:string">TestJob</jobid>
> </nu:getJobState>
> </SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>and the response
>
><?xml version='1.0' encoding='utf-8' ?>
><SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:env="http://www.w3.org/2003/05/soap-envelope"
> xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/">
> <SOAP-ENV:Body>
> <ns1:getJobStateResponse
> xmlns:ns1="http://localhost/dobbin4web"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
> <JobState xsi:type="ns2:JobState" xmlns:ns2="http://soapinterop.org/xsd">
> <state xsi:type="xsd:int">0</state>
> <message xsi:type="xsd:string">Noch nicht Implemementiert</message>
> </JobState>
> </ns1:getJobStateResponse>
> </SOAP-ENV:Body>
></SOAP-ENV:Envelope>
>
>The wsdl part looks like this:
>
> <wsdl:message name="getJobStateRequest">
> <wsdl:part name="jobid" type="xsd:string"/>
> </wsdl:message>
>
> <wsdl:message name="getJobStateResponse">
> <wsdl:part name="getJobStateReturn" type="s:JobState"/>
> </wsdl:message>
>
> <wsdl:operation name="getJobState" parameterOrder="jobid">
> <wsdl:input message="tns:getJobStateRequest"
>name="getJobStateRequest"/>
> <wsdl:output message="tns:getJobStateResponse"
>name="getJobStateResponse"/>
> </wsdl:operation>
>
> <wsdl:operation name="getJobState">
> <soap:operation soapAction="Dobbin4Web#getJobState"/>
> <wsdl:input name="getJobStateRequest">
> <soap:body
>
>encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost/axis/Dobbin4Web"
> use="encoded"/>
> </wsdl:input>
> <wsdl:output name="getJobStateResponse">
> <soap:body
>
>encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost/axis/Dobbin4Web"
> use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
>
>I already thought that its an Axis failure, not generating a compliant
>response, but since php nuSoap understands the response, I thought that at
>least the SOAP Implementation should be able to handle this. And a guy from
>Sun told me that there is a place to configure how the response shall be
>formatted, but didn't said where this could be done.
>
>Thx for your time,
>Marcus
>
>
>
>
>----- Original Message -----
>From: "Doug Kohlert" <Doug.Kohlert_at_Sun.COM>
>To: <users_at_jax-rpc.dev.java.net>
>Sent: Friday, August 20, 2004 8:50 PM
>Subject: Re: Axis and Java WSDP WebServices
>
>
>
>
>>Marcus,
>>Wscompile generates stubs based on what is in the WSDL file. Are you
>>sure that the return message is formatted in compliance with
>>the WSDL? Can you include the WSDL and the response SOAP message you
>>are getting?
>>
>>Marcus Tillmanns wrote:
>>
>>
>>
>>>Hi guys,
>>>
>>>Im new to java and WSDP, I normaly worked with C++ and Axis. I have
>>>
>>>
>written
>
>
>>>a WebService using Axis C++ wich works fine with Axis Clients. But now I
>>>
>>>
>(or
>
>
>>>the customer) wan't to call this Service via Jwsdp / j2ee. The problem is
>>>that Axis doens't encloses its response Messages as the jwsdpstubs think
>>>
>>>
>(
>
>
>>>it omits the funcNameReturn MessageName ). I was told that I can alter
>>>
>>>
>the
>
>
>>>Typemapping wscompile uses, but I can't find where I should do it and how
>>>
>>>
>to
>
>
>>>tell wscompile to use this alternate typemapping. Could you point me
>>>
>>>
>towards
>
>
>>>the right location for this kind of stuff ?
>>>
>>>Thx in advance
>>>Marcus Tillmanns
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>>>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>>>
>>>
>>>
>>>
>>>
>>>
>>--
>>-------------------------------
>>Doug Kohlert
>>Sun MicroSystems, Inc.
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>
>
>
>

-- 
-------------------------------
Doug Kohlert	
Sun MicroSystems, Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net