axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Thomas Manes <atma...@gmail.com>
Subject Re: [problems with Axis-.NET interop]
Date Fri, 06 May 2005 12:24:37 GMT
Marco,

Your response message doesn't match the WSDL, which explains why .NET
can't interpret it. According to your WSDL the response message should
look like this:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
   <executeResponse xmlns="urn:Frequency">
     <executeReturn>
       <result>
         <dataVectors
xmlns:ns1="http://datatypes.webservice.wortschatz.uni_leipzig.de">
           <ns1:dataRow>46593</ns1:dataRow>
           <ns1:dataRow>8</ns1:dataRow>
         </ns1:dataVectors>
       </result>
     </executeReturn>
   </executeResponse>
 </soapenv:Body>
</soapenv:Envelope>

(Axis put dataVectors in the wrong namespace, and because you defined
the dataVectors element as nillable, .NET assumed that you didn't
return a dataVector and therefore returned null.)

Restart Axis and try redeploying the service one more time just to
make sure that something hasn't been changed somewhere along the way.
If you still get this error, please log a bug.

I'm not quite sure why Axis generated the DataVector type in a
separate namespace -- your beanMapping says you want it in the
urn:Frequency namespace:

<beanMapping qname="DataVectorNS:DataVector"
xmlns:DataVectorNS="urn:Frequency"
languageSpecificType="java:de.uni_leipzig.wortschatz.webservice.datatypes.DataVector"/>

Of course, I recommend that you adopt the WSDL First (tm) approach, in
which case your WSDL would dictate the show and ensure much better
interop.

Anne 

Anne

On 5/6/05, Marco Büchler <mai99bnx@studserv.uni-leipzig.de> wrote:
> the wsdl file:
> 
>   <?xml version="1.0" encoding="UTF-8" ?>
> - <#> <wsdl:definitions targetNamespace="*urn:Frequency*"
> xmlns:apachesoap="*http://xml.apache.org/xml-soap*"
> xmlns:impl="*urn:Frequency*" xmlns:intf="*urn:Frequency*"
> xmlns:tns1="*http://datatypes.webservice.wortschatz.uni_leipzig.de*"
> xmlns:wsdl="*http://schemas.xmlsoap.org/wsdl/*"
> xmlns:wsdlsoap="*http://schemas.xmlsoap.org/wsdl/soap/*"
> xmlns:xsd="*http://www.w3.org/2001/XMLSchema*">
> - <#> <!--
> 
> WSDL created by Apache Axis version: 1.2RC3
> Built on Mar 28, 2005 (10:34:47 CEST)
> 
>   -->
> - <#> <wsdl:types>
> - <#> <schema elementFormDefault="*qualified*"
> targetNamespace="*urn:Frequency*"
> xmlns="*http://www.w3.org/2001/XMLSchema*">
>   <import
> namespace="*http://datatypes.webservice.wortschatz.uni_leipzig.de*" />
> - <#> <element name="*execute*">
> - <#> <complexType>
> - <#> <sequence>
>   <element name="*objRequestParameters*" type="*impl:RequestParameter*" />
>   </sequence>
>   </complexType>
>   </element>
> - <#> <complexType name="*DataMatrix*">
> - <#> <sequence>
>   <element maxOccurs="*unbounded*" name="*dataVectors*"
> type="*tns1:DataVector*" />
>   </sequence>
>   </complexType>
> - <#> <complexType name="*RequestParameter*">
> - <#> <sequence>
>   <element name="*corpus*" nillable="*true*" type="*xsd:string*" />
>   <element name="*parameters*" nillable="*true*"
> type="*impl:DataMatrix*" />
>   </sequence>
>   </complexType>
> - <#> <element name="*executeResponse*">
> - <#> <complexType>
> - <#> <sequence>
>   <element name="*executeReturn*" type="*impl:ResponseParameter*" />
>   </sequence>
>   </complexType>
>   </element>
> - <#> <complexType name="*ResponseParameter*">
> - <#> <sequence>
>   <element name="*executionTime*" nillable="*true*" type="*xsd:string*" />
>   <element name="*result*" nillable="*true*" type="*impl:DataMatrix*" />
>   </sequence>
>   </complexType>
> - <#> <element name="*ping*">
>   <complexType />
>   </element>
> - <#> <element name="*pingResponse*">
> - <#> <complexType>
> - <#> <sequence>
>   <element name="*pingReturn*" type="*xsd:string*" />
>   </sequence>
>   </complexType>
>   </element>
>   </schema>
> - <#> <schema elementFormDefault="*qualified*"
> targetNamespace="*http://datatypes.webservice.wortschatz.uni_leipzig.de*"
> xmlns="*http://www.w3.org/2001/XMLSchema*">
>   <import namespace="*urn:Frequency*" />
> - <#> <complexType name="*DataVector*">
> - <#> <sequence>
>   <element maxOccurs="*unbounded*" name="*dataRow*" type="*xsd:string*" />
>   </sequence>
>   </complexType>
>   </schema>
>   </wsdl:types>
> - <#> <wsdl:message name="*executeResponse*">
>   <wsdl:part element="*impl:executeResponse*" name="*parameters*" />
>   </wsdl:message>
> - <#> <wsdl:message name="*pingRequest*">
>   <wsdl:part element="*impl:ping*" name="*parameters*" />
>   </wsdl:message>
> - <#> <wsdl:message name="*pingResponse*">
>   <wsdl:part element="*impl:pingResponse*" name="*parameters*" />
>   </wsdl:message>
> - <#> <wsdl:message name="*executeRequest*">
>   <wsdl:part element="*impl:execute*" name="*parameters*" />
>   </wsdl:message>
> - <#> <wsdl:portType name="*Frequency*">
> - <#> <wsdl:operation name="*execute*">
>   <wsdl:input message="*impl:executeRequest*" name="*executeRequest*" />
>   <wsdl:output message="*impl:executeResponse*" name="*executeResponse*" />
>   </wsdl:operation>
> - <#> <wsdl:operation name="*ping*">
>   <wsdl:input message="*impl:pingRequest*" name="*pingRequest*" />
>   <wsdl:output message="*impl:pingResponse*" name="*pingResponse*" />
>   </wsdl:operation>
>   </wsdl:portType>
> - <#> <wsdl:binding name="*FrequencySoapBinding*" type="*impl:Frequency*">
>   <wsdlsoap:binding style="*document*"
> transport="*http://schemas.xmlsoap.org/soap/http*" />
> - <#> <wsdl:operation name="*execute*">
>   <wsdlsoap:operation soapAction="" />
> - <#> <wsdl:input name="*executeRequest*">
>   <wsdlsoap:body use="*literal*" />
>   </wsdl:input>
> - <#> <wsdl:output name="*executeResponse*">
>   <wsdlsoap:body use="*literal*" />
>   </wsdl:output>
>   </wsdl:operation>
> - <#> <wsdl:operation name="*ping*">
>   <wsdlsoap:operation soapAction="" />
> - <#> <wsdl:input name="*pingRequest*">
>   <wsdlsoap:body use="*literal*" />
>   </wsdl:input>
> - <#> <wsdl:output name="*pingResponse*">
>   <wsdlsoap:body use="*literal*" />
>   </wsdl:output>
>   </wsdl:operation>
>   </wsdl:binding>
> - <#> <wsdl:service name="*FrequencyService*">
> - <#> <wsdl:port binding="*impl:FrequencySoapBinding*" name="*Frequency*">
>   <wsdlsoap:address
> location="*http://aspra20.informatik.uni-leipzig.de:8888/axis/services/Frequency*"
> />
>   </wsdl:port>
>   </wsdl:service>
>   </wsdl:definitions>
> 
> ciao
> marco
> 
> Anne Thomas Manes schrieb:
> 
> >Please provide the WSDL.
> >
> >On 5/6/05, Marco Büchler <mai99bnx@studserv.uni-leipzig.de> wrote:
> >
> >
> >>hi,
> >>
> >>we 're trying to install some services needing some more complex
> >>datatypes. first we tried an String[][] but we got some problems with
> >>this. so we tried to splitt String[][] into an datamatrix-objekt
> >>including an array of datavectors. an datavector has a
> >>string[]-array-field. se attachments. the deploy-script is attached, too.
> >>
> >>the soap-request-message using axis:
> >><?xml version="1.0" encoding="utf-8"?>
> >><soapenv:Envelope
> >>xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> >>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >>  <soapenv:Body>
> >>    <execute xmlns="urn:Frequency">
> >>      <objRequestParameters>
> >>        <corpus>de2</corpus>
> >>        <parameters>
> >>          <dataVectors>
> >>            <ns1:dataRow
> >>xmlns:ns1="http://datatypes.webservice.wortschatz.uni_leipzig.de">Wort</ns1:dataRow>
> >>            <ns2:dataRow
> >>xmlns:ns2="http://datatypes.webservice.wortschatz.uni_leipzig.de">suchen</ns2:dataRow>
> >>          </dataVectors>
> >>        </parameters>
> >>      </objRequestParameters>
> >>    </execute>
> >>  </soapenv:Body>
> >></soapenv:Envelope>
> >>
> >>the soap-request-message using .NET:
> >><?xml version="1.0" encoding="utf-8"?>
> >><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> >>  <soap:Body>
> >>    <execute xmlns="urn:Frequency">
> >>      <objRequestParameters>
> >>        <corpus>de2</corpus>
> >>        <parameters>
> >>          <dataVectors>
> >>            <dataRow
> >>xmlns="http://datatypes.webservice.wortschatz.uni_leipzig.de">Wort</dataRow>
> >>            <dataRow
> >>xmlns="http://datatypes.webservice.wortschatz.uni_leipzig.de">suchen</dataRow>
> >>          </dataVectors>
> >>        </parameters>
> >>      </objRequestParameters>
> >>    </execute>
> >>  </soap:Body>
> >></soap:Envelope>
> >>
> >>both request can axis handle. and the axis produce the following
> >>response-message:
> >><?xml version="1.0" encoding="UTF-8"?>
> >><soapenv:Envelope
> >>xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> >>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >>  <soapenv:Body>
> >>    <executeResponse xmlns="urn:Frequency">
> >>      <executeReturn>
> >>        <result>
> >>          <ns1:dataVectors xsi:type="ns2:DataVector"
> >>xmlns:ns1="http://datatypes.webservice.wortschatz.uni_leipzig.de"
> >>xmlns:ns2="urn:Frequency">
> >>            <ns1:dataRow>46593</ns1:dataRow>
> >>            <ns1:dataRow>8</ns1:dataRow>
> >>          </ns1:dataVectors>
> >>        </result>
> >>      </executeReturn>
> >>    </executeResponse>
> >>  </soapenv:Body>
> >></soapenv:Envelope>
> >>
> >>the axis-client work fine. the .NET-client can't handle this message and
> >>deserialize NULL.
> >>
> >>does anybody know what's wrong??? hints and solutions are welcome.
> >>
> >>regards
> >>
> >>ciao
> >>marco
> >>
> >>
> >><deployment xmlns="http://xml.apache.org/axis/wsdd/"
> >>            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
> >>
> >> <handler name="FrequencyOptions"
> >>    type="java:de.uni_leipzig.wortschatz.webservice.usermanagement.handler.OptionsHandler"/>
> >>
> >> <handler name="FrequencyAuthentication"
> >>    type="java:de.uni_leipzig.wortschatz.webservice.usermanagement.handler.UserAuthenticationHandler"/>
> >>
> >> <handler name="FrequencyAuthorization"
> >>    type="java:de.uni_leipzig.wortschatz.webservice.usermanagement.handler.UserAuthorizationHandler"/>
> >>
> >> <handler name="FrequencyCorpus"
> >>    type="java:de.uni_leipzig.wortschatz.webservice.usermanagement.handler.CorpusHandler"/>
> >>
> >> <!--handler name="FrequencyLogout"
> >>    type="java:de.uni_leipzig.wortschatz.webservice.usermanagement.handler.LogoutHandler"/-->
> >>
> >> <!-- provider="java:RPC" -->
> >> <service name="Frequency" style="wrapped" use="literal">
> >>  <requestFlow>
> >>  <handler type="soapmonitor"/>
> >>   <handler type="FrequencyOptions"/>
> >>   <handler type="FrequencyAuthentication"/>
> >>   <handler type="FrequencyAuthorization"/>
> >>   <handler type="FrequencyCorpus"/>
> >>  </requestFlow>
> >>  <responseFlow>
> >>   <handler type="soapmonitor"/>
> >>   <!--handler type="FrequencyLogout"/-->
> >>  </responseFlow>
> >>  <parameter name="className" value="de.uni_leipzig.wortschatz.webservice.webservices.Frequency"/>
> >>  <parameter name="allowedMethods" value="*"/>
> >>  <beanMapping qname="RequestparameterNS:RequestParameter" xmlns:RequestparameterNS="urn:Frequency"
languageSpecificType="java:de.uni_leipzig.wortschatz.webservice.datatypes.RequestParameter"/>
> >>  <beanMapping qname="DataMatrixNS:DataMatrix" xmlns:DataMatrixNS="urn:Frequency"
languageSpecificType="java:de.uni_leipzig.wortschatz.webservice.datatypes.DataMatrix"/>
> >>  <beanMapping qname="DataVectorNS:DataVector" xmlns:DataVectorNS="urn:Frequency"
languageSpecificType="java:de.uni_leipzig.wortschatz.webservice.datatypes.DataVector"/>
> >>  <beanMapping qname="ResponseparameterNS:ResponseParameter" xmlns:ResponseparameterNS="urn:Frequency"
languageSpecificType="java:de.uni_leipzig.wortschatz.webservice.datatypes.ResponseParameter"/>
> >>  <namespace>urn:Frequency</namespace>
> >> </service>
> >>
> >></deployment>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> 
>

Mime
View raw message