Loading ...
Sorry, an error occurred while loading the content.

VB/Apache using WSDL

Expand Messages
  • Hansen, Richard
    I am working at getting VB to talk to Apache SOAP. I have gotten the low level API to work all along. The high level API has been a real pain. I am using the
    Message 1 of 2 , Mar 14, 2001
    • 0 Attachment
      I am working at getting VB to talk to Apache SOAP. I have gotten the low
      level API to work all along. The high level API has been a real pain. I am
      using the MS SOAP 2.0 beta 2 and a very recent Apache SOAP nightly binary.
      So most of the compatiblity issues have gone away.

      I am having the all too familiar problem that MS does not put type info in
      the XML (even though it is in the WSDL file!) when using the high level api.
      I have been through the explaination at
      http://marc.theaimsgroup.com/?l=soap-dev&m=97901982213396&w=2 of how to map
      types manually in Apache. The example given is :

      <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:x="" qname="x:nameToLookup"

      xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/>

      Problem is when I define a name space for my type mapping I just get weird
      results from Apache. This is partly because I can't get MS to define the
      namespace correctly in the XML. It is also partly because Apache seems not
      to be parsing quite right. The only thing that works is to not define a
      namespace for the parameter at all. It seems like I really ought to be using
      namespaces though.

      MS generates XML like this by default:

      <m:getRate xmlns:m="urn:demo:exchange"><country1>USA</country1>

      I tried using the default "m" namespace which MS uses to the "part" in my
      WSDL. I can't see how to get any other namespace from the WSDL into the MS
      generated soap message. MS sends the XML as <m:country1> like I would
      expect. But then Apache says it cannot find a deserializer for
      "urn:demo:exchange:m:country1" which I did not expect.

      Can anyone shed any light on how to do this better or more correctly?

      Thanks

      Rick Hansen

      My WSDL file :

      <message name="IngetRateRequest">
      <part name="country1" type="xsd:string"/>
      <part name="country2" type="xsd:string"/>
      </message>


      My Apache SOAP deployment type mapping :

      encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
      elementType=null
      javaType=java.lang.String
      java2XMLClassName=null
      xml2JavaClassName=org.apache.soap.encoding.soapenc.StringDeserializer
    • Mike Deem
      country1 is not namespace qualified as is consistent with SOAP section 5 encoding (accessor elements in a struct are not namespace qualified) and section 7
      Message 2 of 2 , Mar 15, 2001
      • 0 Attachment
        country1 is not namespace qualified as is consistent with SOAP section 5
        encoding (accessor elements in a struct are not namespace qualified) and
        section 7 (method calls are modeled as a struct with an accessor for
        each parameter).

        The namespaces used in the XML are determined by following the WSDL and
        SOAP specifications. Changing things like style="rpc" to
        style="document" and use="encoded" to use="literal" change these rules.
        Essentially style determines if SOAP section 7 is used and use
        determines if SOAP section 5 is used. The toolkit supports both
        rpc/encoded and document/literal (but there are a couple of bugs in the
        document/literal support in beta 2). I believe Apache SOAP expects
        rpc/encoded messages.

        Exactly what do you have in your WSDL? Exactly what did you expect to
        see on the wire?

        BTW: the fact that the WSDL contains type information does not imply
        that it should be copied to the SOAP message. In fact, the opposite is
        true. xsi:type is intended to be used for polymorphic parameters or when
        external type information isn't present. In this case, there is external
        type information in the form of the WSDL. Someday, I'm sure that Apache
        SOAP will use that information and all will be well.... just kidding, I
        do *not* want to re-open this debate :-).

        == Mike ==

        Microsoft
        SOAP Toolkit
        Program Manager


        -----Original Message-----
        From: Hansen, Richard [mailto:Richard.Hansen@...]
        Sent: Wednesday, March 14, 2001 10:34 AM
        To: 'soapbuilders@yahoogroups.com'
        Subject: [soapbuilders] VB/Apache using WSDL


        I am working at getting VB to talk to Apache SOAP. I have gotten the low
        level API to work all along. The high level API has been a real pain. I
        am
        using the MS SOAP 2.0 beta 2 and a very recent Apache SOAP nightly
        binary.
        So most of the compatiblity issues have gone away.

        I am having the all too familiar problem that MS does not put type info
        in
        the XML (even though it is in the WSDL file!) when using the high level
        api.
        I have been through the explaination at
        http://marc.theaimsgroup.com/?l=soap-dev&m=97901982213396&w=2 of how to
        map
        types manually in Apache. The example given is :

        <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        xmlns:x="" qname="x:nameToLookup"

        xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/
        >

        Problem is when I define a name space for my type mapping I just get
        weird
        results from Apache. This is partly because I can't get MS to define the
        namespace correctly in the XML. It is also partly because Apache seems
        not
        to be parsing quite right. The only thing that works is to not define a
        namespace for the parameter at all. It seems like I really ought to be
        using
        namespaces though.

        MS generates XML like this by default:

        <m:getRate xmlns:m="urn:demo:exchange"><country1>USA</country1>

        I tried using the default "m" namespace which MS uses to the "part" in
        my
        WSDL. I can't see how to get any other namespace from the WSDL into the
        MS
        generated soap message. MS sends the XML as <m:country1> like I would
        expect. But then Apache says it cannot find a deserializer for
        "urn:demo:exchange:m:country1" which I did not expect.

        Can anyone shed any light on how to do this better or more correctly?

        Thanks

        Rick Hansen

        My WSDL file :

        <message name="IngetRateRequest">
        <part name="country1" type="xsd:string"/>
        <part name="country2" type="xsd:string"/>
        </message>


        My Apache SOAP deployment type mapping :

        encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
        elementType=null
        javaType=java.lang.String
        java2XMLClassName=null
        xml2JavaClassName=org.apache.soap.encoding.soapenc.StringDeserializer


        To unsubscribe from this group, send an email to:
        soapbuilders-unsubscribe@yahoogroups.com



        Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/
      Your message has been successfully submitted and would be delivered to recipients shortly.