Great, thanks for the tip, works very well, and also handles document style
(which WSIF doesn't ;-)

Since I am never satisfied however, I have more questions/requests.

It seems that the DII mechanism can't handle complex types used as reference
in message part definitions i.e.

<s:element name="ValidMod10Response">
  <s:complexType>
    <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="ValidMod10Result"
type="s:boolean" />
    </s:sequence>
  </s:complexType>
</s:element>

<message name="ValidMod10SoapOut">
  <part name="parameters" element="s0:ValidMod10Response" />
</message>

I get an error saying

Exception in thread "main" org.xml.sax.SAXException: Deserializing parameter
'ValidMod10Result':  could not find deserializer for ty
pe java:org.w3c.dom.Element
org.xml.sax.SAXException: Deserializing parameter 'ValidMod10Result':  could
not find deserializer for type java:org.w3c.dom.Element

        at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:228)
        at
org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:631)
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:197)
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
447)
        at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:118)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:142)
        at org.apache.axis.client.Call.invoke(Call.java:1212)
        at org.apache.axis.client.Call.invoke(Call.java:1131)
        at org.apache.axis.client.Call.invoke(Call.java:756)

Now if I change it to

<message name="ValidMod10SoapOut">
  <part name="parameters" type="s:boolean" />
</message>

Everything works just fine. Since I did not write the WSDL or the external
service, I can't change the WSDL (I can keep a local modified copy I guess)

Anyway obviously the logic to work out the "real" Java type of the parameter
is there because WSDL2Java generate a method signature like this

boolean validMod10(String CardNumber)

Is there a way I can take advantage of the same logic with Dynamic
invocations ?

Thanks,
Matthew

> -----Original Message-----
> From: Doug Davis [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 5:29 PM
> To: [EMAIL PROTECTED]
> Subject: Re: dynamic invocation of WSDL defined services
>
>
> Yes - Axis can do this - look at the DII part of JAX-RPC.
> Or, look at java\samples\stock\getQuote1.java to see
> how to invoke a Web Service with just the WSDL - no stubs.
> -Dug
>
>
> "J. Matthew Pryor" <[EMAIL PROTECTED]> on 01/30/2002 11:55:28 PM
>
> Please respond to [EMAIL PROTECTED]
>
> To:    <[EMAIL PROTECTED]>
> cc:
> Subject:    dynamic invocation of WSDL defined services
>
>
>
> The alphaworks WSIF ( http://www.alphaworks.ibm.com/tech/wsif )
> has a great
> feature, it is able to invoke a WebService dynamically based solely on the
> WDSL definition (i.e. no stubs)
>
> Especially for prototyping, this is really handy
>
> I can't see any similar functionality in Axis, did I miss it ?
>
> There is obviously a lot of machinery in Axis to be able to do this, any
> plans ?
>
> Thanks,
> Matthew
>
>
>

Reply via email to