When using the message interface, the application must work with XML, not types. The SOAP process accepts and returns DOM. If you want your .NET client to get a typed object rather than DOM, then you must define the schema for publishCatalog and newPublishCatalog elements.

Anne

On 11/10/05, Kr <[EMAIL PROTECTED]> wrote:
I have a message style web service with 2 operations like below :

server-config.wsdd
----------------------------------------------
<service name="CatalogPublisherService" provider="java:MSG"
style="message" use="literal">
<parameter name="allowedMethods" value="publishCatalog,newPublishCatalog"/>
<parameter name="className" value="message.CatalogPublisherService "/>
<parameter name="sendMultiRefs" value="false"/>
<parameter name="sendXsiTypes" value="false"/>
</service>
----------------------------------------------





CatalogPublisherService.java has below method signatures:
public Element[] publishCatalog(Element[] inputElementsArray) throws Exception
public Element[] newPublishCatalog(Element[] inputElementsArray)
throws Exception



How to handler xsd:anyType with Message Style web services ?



CatalogPublisherService.wsdl
----------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions
targetNamespace="http://localhost:8080/axis/services/CatalogPublisherService "
                                                xmlns:apachesoap="http://xml.apache.org/xml-soap"
                                                xmlns:impl=" http://localhost:8080/axis/services/CatalogPublisherService"
                                                xmlns:intf=" http://localhost:8080/axis/services/CatalogPublisherService"
                                                xmlns:tns1="http://message"
                                                xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/"
                                                xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/ "
                                                xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<wsdl:types>
  <schema targetNamespace=" http://message"
xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="publishCatalog" type="xsd:anyType"/>
   <element name="newPublishCatalog" type="xsd:anyType"/>
  </schema>

  <schema targetNamespace=" http://localhost:8080/axis/services/CatalogPublisherService"
                        xmlns="http://www.w3.org/2001/XMLSchema">
   <element name="publishCatalogReturn" type="xsd:anyType"/>
   <element name="newPublishCatalogReturn" type="xsd:anyType"/>
  </schema>
</wsdl:types>

   <wsdl:message name="newPublishCatalogResponse">

      <wsdl:part element="impl:newPublishCatalogReturn"
name="newPublishCatalogReturn"/>

   </wsdl:message>

   <wsdl:message name="publishCatalogRequest">

      <wsdl:part element="tns1:publishCatalog" name="part"/>

   </wsdl:message>

   <wsdl:message name="publishCatalogResponse">

      <wsdl:part element="impl:publishCatalogReturn"
name="publishCatalogReturn"/>

   </wsdl:message>

   <wsdl:message name="newPublishCatalogRequest">

      <wsdl:part element="tns1:newPublishCatalog" name="part"/>

   </wsdl:message>

   <wsdl:portType name="CatalogPublisherService">

      <wsdl:operation name="publishCatalog">

         <wsdl:input message="impl:publishCatalogRequest"
name="publishCatalogRequest"/>

         <wsdl:output message="impl:publishCatalogResponse"
name="publishCatalogResponse"/>

      </wsdl:operation>

      <wsdl:operation name="newPublishCatalog">

         <wsdl:input message="impl:newPublishCatalogRequest"
name="newPublishCatalogRequest"/>

         <wsdl:output message="impl:newPublishCatalogResponse"
name="newPublishCatalogResponse"/>

      </wsdl:operation>

   </wsdl:portType>

   <wsdl:binding name="CatalogPublisherServiceSoapBinding"
type="impl:CatalogPublisherService">

      <wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

      <wsdl:operation name="publishCatalog">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="publishCatalogRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="publishCatalogResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

      <wsdl:operation name="newPublishCatalog">

         <wsdlsoap:operation soapAction=""/>

         <wsdl:input name="newPublishCatalogRequest">

            <wsdlsoap:body use="literal"/>

         </wsdl:input>

         <wsdl:output name="newPublishCatalogResponse">

            <wsdlsoap:body use="literal"/>

         </wsdl:output>

      </wsdl:operation>

   </wsdl:binding>

   <wsdl:service name="CatalogPublisherServiceService">

      <wsdl:port binding="impl:CatalogPublisherServiceSoapBinding"
name="CatalogPublisherService">

         <wsdlsoap:address
location=" http://localhost:9999/axis/services/CatalogPublisherService"/>

      </wsdl:port>

   </wsdl:service>

</wsdl:definitions>
----------------------------------------------------------------------------------------------------




As you can see in above wsdl the input to the methods are xsd:anyType.
Now say if I want to use the wsdl to generate the stubs and use those
stubs to call the actual service then what type of objects do I need
to create and pass to the service ? I am confused here since finally I
want to give my wsdl to .NET client and wondering how he'll be calling
my service using my wsdl. I am successfully calling the service by
using DII approach rather than stub appraoch in my client program.


Thanks in advance.

Reply via email to