You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Dasarath Weeratunge <da...@yahoo.com> on 2004/06/15 18:41:55 UTC

Using ws-addressing impl

Hi

I'm using ws-fx/ws-addressing impl in the ws-atomic
transaction impl that I'm working on. Using wsdl2java
I generated stubs/impl classes for wsdls ws-at &
ws-coor. These classes also contain classes from
ws-addressing.xsd also found in ws-fx/ws-addressing
impl.

I notice that there are some differences b/w the
generated classes and their ws-fx/ws-addressing impl
counterparts like the interfaces they implement. Still
I went ahead and refactored my code to use
ws-fx/ws-addressing impl classes rather than the
generated ones. Now the code compiles but I get
AxisFaults - when the messages are de-serialized.

Is it possible to use ws-fx/ws-addressing impl classes
in place of generated classes from addressing.xsd? If
so, how should I do it? Being new to wsdl/axis area, I
simply mapped the namespace
"http://schemas.xmlsoap.org/ws/2003/03/addressing" to
org.apache.axis.message.addressing when using
wsdl2java and later deleted the generated classes -
this doesn't work.

Thanks

Dasarath



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

Using ws-addressing impl (need more help!)

Posted by Dasarath Weeratunge <da...@yahoo.com>.
Hi

I'm tring to use ws-fx/ws-addressing in my ws-at
implementation. I generated stubs/skel using wsdl2java
for
wsat.wsdl and wscoor.wsdl for all namespaces except
"http://schemas.xmlsoap.org/ws/2004/03/addressing"
and then later renamed all occurances of
org.xmlsoap.schemas.ws._2004._03.addressing.* to
org.apache.axis.message.addressing.* in the stubs
and the deploy.wsdd file. The code compiles but when
run, gives the following exception. I have also
attached the messages.

Earlier I was indeed using 2003/03/* addressing
namespace but after the help I got from the mailing
list I got the latest 2004/03/* addressing.xsd
I'm using ws-addressing-1.0.jar built using a CVS
checkout obtained today (16/06/2004). I'm using the
Axis jars downloaded by maven 
when building ws-addressing.

What should I do about this? Are there any other
places where I have to do alterations? I'm using the
following schemas & wsdls
wsat.wsdl, wsat.xsd, wscoor.wsdl, wscoor.xsd,
utility.xsd, addressing.xsd

Note: wscoor.wsdl was using the earlier 2003/03
addressing namespace. I renames it to use 2004/03
before generating the classes

Thanks

Dasarath


log4j:WARN No appenders could be found for logger
(org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system
properly.
AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.IllegalArgumentException:
argument type mismatch
 faultActor: 
 faultNode: 
 faultDetail: 

{http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException:
argument type mismatch
	at
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:142)
	at
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:248)
	at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:512)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1060)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1056)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
	at org.apache.axis.client.Call.invoke(Call.java:2405)
	at org.apache.axis.client.Call.invoke(Call.java:2304)
	at org.apache.axis.client.Call.invoke(Call.java:1765)
	at
org.xmlsoap.schemas.ws._2003._09.wscoor.ActivationPortTypeRPCBindingStub.createCoordinationContextOperation(ActivationPortTypeRPCBindingStub.java:305)
	at test.ws.Tester2Client.main(Tester2Client.java:36)

	{http://xml.apache.org/axis/}hostname:sarasavi-pub3

java.lang.IllegalArgumentException: argument type
mismatch
	at
org.apache.axis.AxisFault.makeFault(AxisFault.java:99)
	at org.apache.axis.client.Call.invoke(Call.java:2408)
	at org.apache.axis.client.Call.invoke(Call.java:2304)
	at org.apache.axis.client.Call.invoke(Call.java:1765)
	at
org.xmlsoap.schemas.ws._2003._09.wscoor.ActivationPortTypeRPCBindingStub.createCoordinationContextOperation(ActivationPortTypeRPCBindingStub.java:305)
	at test.ws.Tester2Client.main(Tester2Client.java:36)
Caused by: java.lang.IllegalArgumentException:
argument type mismatch
	at
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:142)
	at
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:248)
	at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:512)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1060)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1056)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
	at org.apache.axis.client.Call.invoke(Call.java:2405)
	... 4 more


==============
Listen Port: 8081
Target Host: 127.0.0.1
Target Port: 8080
==== Request ====
POST /jboss-net/services/ActivationRPC HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime,
multipart/related, text/*
User-Agent: Axis/1.2beta
Host: 127.0.0.1:8081
Cache-Control: no-cache
Pragma: no-cache
SOAPAction:
"http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperation"
Content-Length: 953

<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"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
   <soapenv:Header>
      <wsa:MessageID
soapenv:mustUnderstand="0">uuid:4E562D20-BFA1-11D8-91B1-81AA077BEC57</wsa:MessageID>
      <wsa:To
soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC</wsa:To>
      <wsa:Action
soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperation</wsa:Action>
      <wsa:From>
        
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:Address>
      </wsa:From>
   </soapenv:Header>
   <soapenv:Body>
      <CreateCoordinationContext
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wscoor">
        
<CoordinationType>http://schemas.xmlsoap.org/ws/2003/09/wsat</CoordinationType>
      </CreateCoordinationContext>
   </soapenv:Body></soapenv:Envelope>


==== Response ====
HTTP/1.1 200 OK
Content-Type: text/xml;charset=utf-8
Date: Wed, 16 Jun 2004 14:27:33 GMT
Server: Apache-Coyote/1.1
Connection: close

<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"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
   <soapenv:Header>
      <wsa:MessageID
soapenv:mustUnderstand="0">uuid:4E7C52C0-BFA1-11D8-8DD7-98C10D532353</wsa:MessageID>
      <wsa:To
soapenv:mustUnderstand="0">http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
      <wsa:Action
soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperationResponse</wsa:Action>
      <wsa:From>
        
<wsa:Address>http://localhost:8081/jboss-net/services/ActivationRPC</wsa:Address>
      </wsa:From>
      <ns0:RelatesTo RelationshipType="wsa:Reply"
soapenv:mustUnderstand="0"
xmlns:ns0="http://schemas.xmlsoap.org/ws/2004/03/addressing">uuid:4E562D20-BFA1-11D8-91B1-81AA077BEC57</ns0:RelatesTo>
   </soapenv:Header>
   <soapenv:Body>
      <CreateCoordinationContextResponse
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wscoor">
         <CoordinationContext>
            <ns1:Identifier
xmlns:ns1="http://schemas.xmlsoap.org/ws/2002/07/utility">xid:258-1087396053468-0</ns1:Identifier>
           
<CoordinationType>http://schemas.xmlsoap.org/ws/2003/09/wsat</CoordinationType>
            <RegistrationService>
               <wsa:Address
xsi:type="xsd:anyURI">http://localhost:8081/jboss-net/services/RegistrationRPC</wsa:Address>
               <wsa:ReferenceProperties>
                  <wsu:Identifier
xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">xid:258-1087396053468-0</wsu:Identifier>
               </wsa:ReferenceProperties>
            </RegistrationService>
         </CoordinationContext>
      </CreateCoordinationContextResponse>
   </soapenv:Body></soapenv:Envelope>
==============






--- Jarek Gawor <ga...@mcs.anl.gov> wrote:
> Deleting generated classes should work ok. With
> wsdl2java you can exclude a
> namespace so that the classes for the given
> namespace are not generated in
> the first place. That can be done with "-x" option,
> for example: -x
> http://schemas.xmlsoap.org/ws/2004/03/addressing
> 
> Btw, please notice that the latest addressing code
> is based on the 2004
> version of the specification (the ../2004/03/..
> namespace). Are the specs
> you are working on using the same ws-addressing
> namespace? 
> 
> Jarek
> 
> > -----Original Message-----
> > From: Dasarath Weeratunge
> [mailto:dasarathweeratunge@yahoo.com] 
> > Sent: Tuesday, June 15, 2004 12:42 PM
> > To: fx-dev@ws.apache.org
> > Subject: Using ws-addressing impl
> > 
> > 
> > Hi
> > 
> > I'm using ws-fx/ws-addressing impl in the
> ws-atomic
> > transaction impl that I'm working on. Using
> wsdl2java
> > I generated stubs/impl classes for wsdls ws-at &
> > ws-coor. These classes also contain classes from 
> > ws-addressing.xsd also found in
> ws-fx/ws-addressing impl.
> > 
> > I notice that there are some differences b/w the
> > generated classes and their ws-fx/ws-addressing
> impl 
> > counterparts like the interfaces they implement.
> Still I went 
> > ahead and refactored my code to use
> ws-fx/ws-addressing impl 
> > classes rather than the generated ones. Now the
> code compiles 
> > but I get AxisFaults - when the messages are
> de-serialized.
> > 
> > Is it possible to use ws-fx/ws-addressing impl
> classes
> > in place of generated classes from addressing.xsd?
> If
> > so, how should I do it? Being new to wsdl/axis
> area, I
> > simply mapped the namespace 
> > "http://schemas.xmlsoap.org/ws/2003/03/addressing"
> to 
> > org.apache.axis.message.addressing when using
> wsdl2java and 
> > later deleted the generated classes - this doesn't
> work.
> > 
> > Thanks
> > 
> > Dasarath
> > 
> > 
> > 
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage!
> 
> > http://promotions.yahoo.com/new_mail 
> > 
> > 
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

Re: Re: ws-addressing // !!! We shouldn't be removing these headers here.

Posted by Dasarath Weeratunge <da...@yahoo.com>.
--- Davanum Srinivas <da...@gmail.com> wrote:
> please submit a patch to JIRA.
> 
> thanks,
> dims
> 

====================================================
--- AddressingHeaders-old.java	2004-06-19
18:44:09.000000000 +0600
+++ AddressingHeaders.java	2004-06-19
18:48:32.000000000 +0600
@@ -201,8 +201,9 @@
             } else if
(localName.equals(Constants.RELATES_TO)) {
                 relatesTo.add(new
RelatesTo(headerElement));
             } else {
-            	// its a reference property 
-            	processReferenceProperty(headerElement,
refPropsQNames); 
+            	// it could be a reference property 
+		if (!processReferenceProperty(headerElement,
refPropsQNames))
+			continue; 
             }
 
             // !!! We shouldn't be removing these
headers here.  The only
@@ -509,7 +510,7 @@
      * @param headerElement
      * @throws Exception
      */
-    private void
processReferenceProperty(SOAPHeaderElement
headerElement, 
+    private boolean
processReferenceProperty(SOAPHeaderElement
headerElement, 
                                           List
refPropQNames) 
         throws Exception {
         Name name = headerElement.getElementName();
@@ -518,9 +519,14 @@
         // if we got to this point, the user wants
deserialization of ref props.
         // if refPropQNames was a null, it is treated
as a '*' or process all headers
         // otherwise we check to see if the element
name was specified by the user
+       
         if ((refPropQNames == null) ||
(refPropQNames.contains(elementName))) {
             referenceProperties.add(headerElement);
+	       return true;
         }
+               
+        //	we didn't process the header so return
false
+        return false;
     }
 	
     /**




		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

Re: ws-addressing // !!! We shouldn't be removing these headers here.

Posted by Davanum Srinivas <da...@gmail.com>.
please submit a patch to JIRA.

thanks,
dims

On Fri, 18 Jun 2004 10:17:50 -0700 (PDT), Dasarath Weeratunge
<da...@yahoo.com> wrote:
> 
> AddressingHeaders
> 
>        // !!! We shouldn't be removing these headers
> here.  The only
>             // reason to remove them is for use as an
> intermediary, and
>             // that should work via the
> infrastructure, NOT by removing
>             // headers here.  Removing them here just
> means other handlers
>             // which run after this one don't see the
> whole message, which
>             // is bad.  Change awaiting discussion on
> fx-dev.  --Glen
> 
>             // must have found one
>             if (remove) {
>                 headerElement.detachNode();
>             }
> 
> Hi,
> 
> Please correct me if I'm wrong but it seems that the
> WSAddressingHandler removes all header elements even
> when the
> 
> reference properties are clearly identified in the
> <parameter name="referencePropertyNames" ...>.
> As a result, WSAtomicTransactionHandler in the ws-at
> impl that I'm working on was not able to see the
> coordination
> 
> context.
> 
> I think we can get the handler to process the non-wsa
> elements but only those that are enumerated under
> 
> "referencePropertyNames" by allowing the
> processReferenceProperty  method to return a boolean.
> 
> Thanks
> 
> Dasarath
> 
> 
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

RE: ws-addressing // !!! We shouldn't be removing these headers here.

Posted by Jarek Gawor <ga...@mcs.anl.gov>.
That should be fixed now along with another problem I found in the code.
Also, the ignoreNonWSAHeader parameter is not needed anymore. Just pass the
refProperties list as null (for all non-wsa headers), empty (to ignore all
non-wsa headers - default), or non empty with some qnames for specific
headers. During testing I think I also ran into some Axis-specific issues
which need to be investigated more.

Jarek

> -----Original Message-----
> From: Davanum Srinivas [mailto:davanum@gmail.com] 
> Sent: Friday, June 18, 2004 6:52 PM
> To: Dasarath Weeratunge; Jarek Gawor
> Cc: fx-dev@ws.apache.org
> Subject: Re: ws-addressing // !!! We shouldn't be removing 
> these headers here.
> 
> 
> Jarek,
> 
> Can you please review this?
> 
> thanks,
> dims
> 
> On Fri, 18 Jun 2004 10:17:50 -0700 (PDT), Dasarath Weeratunge 
> <da...@yahoo.com> wrote:
> > 
> > AddressingHeaders
> > 
> >        // !!! We shouldn't be removing these headers
> > here.  The only
> >             // reason to remove them is for use as an intermediary, 
> > and
> >             // that should work via the
> > infrastructure, NOT by removing
> >             // headers here.  Removing them here just
> > means other handlers
> >             // which run after this one don't see the
> > whole message, which
> >             // is bad.  Change awaiting discussion on
> > fx-dev.  --Glen
> > 
> >             // must have found one
> >             if (remove) {
> >                 headerElement.detachNode();
> >             }
> > 
> > Hi,
> > 
> > Please correct me if I'm wrong but it seems that the 
> > WSAddressingHandler removes all header elements even when the
> > 
> > reference properties are clearly identified in the
> > <parameter name="referencePropertyNames" ...>.
> > As a result, WSAtomicTransactionHandler in the ws-at
> > impl that I'm working on was not able to see the
> > coordination
> > 
> > context.
> > 
> > I think we can get the handler to process the non-wsa elements but 
> > only those that are enumerated under
> > 
> > "referencePropertyNames" by allowing the processReferenceProperty  
> > method to return a boolean.
> > 
> > Thanks
> > 
> > Dasarath
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage! 
> > http://promotions.yahoo.com/new_mail
> > 
> 
> 
> 
> 
> -- 
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 
> 


Re: ws-addressing // !!! We shouldn't be removing these headers here.

Posted by Davanum Srinivas <da...@gmail.com>.
Jarek,

Can you please review this?

thanks,
dims

On Fri, 18 Jun 2004 10:17:50 -0700 (PDT), Dasarath Weeratunge
<da...@yahoo.com> wrote:
> 
> AddressingHeaders
> 
>        // !!! We shouldn't be removing these headers
> here.  The only
>             // reason to remove them is for use as an
> intermediary, and
>             // that should work via the
> infrastructure, NOT by removing
>             // headers here.  Removing them here just
> means other handlers
>             // which run after this one don't see the
> whole message, which
>             // is bad.  Change awaiting discussion on
> fx-dev.  --Glen
> 
>             // must have found one
>             if (remove) {
>                 headerElement.detachNode();
>             }
> 
> Hi,
> 
> Please correct me if I'm wrong but it seems that the
> WSAddressingHandler removes all header elements even
> when the
> 
> reference properties are clearly identified in the
> <parameter name="referencePropertyNames" ...>.
> As a result, WSAtomicTransactionHandler in the ws-at
> impl that I'm working on was not able to see the
> coordination
> 
> context.
> 
> I think we can get the handler to process the non-wsa
> elements but only those that are enumerated under
> 
> "referencePropertyNames" by allowing the
> processReferenceProperty  method to return a boolean.
> 
> Thanks
> 
> Dasarath
> 
> 
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
> 




-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

ws-addressing // !!! We shouldn't be removing these headers here.

Posted by Dasarath Weeratunge <da...@yahoo.com>.
AddressingHeaders

       // !!! We shouldn't be removing these headers
here.  The only
            // reason to remove them is for use as an
intermediary, and
            // that should work via the
infrastructure, NOT by removing
            // headers here.  Removing them here just
means other handlers
            // which run after this one don't see the
whole message, which
            // is bad.  Change awaiting discussion on
fx-dev.  --Glen

            // must have found one
            if (remove) {
                headerElement.detachNode();
            }

Hi,

Please correct me if I'm wrong but it seems that the
WSAddressingHandler removes all header elements even
when the 

reference properties are clearly identified in the
<parameter name="referencePropertyNames" ...>.
As a result, WSAtomicTransactionHandler in the ws-at
impl that I'm working on was not able to see the
coordination 

context.

I think we can get the handler to process the non-wsa
elements but only those that are enumerated under 

"referencePropertyNames" by allowing the
processReferenceProperty  method to return a boolean.

Thanks

Dasarath



	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

Re: Using ws-addressing impl (need more help!)

Posted by Davanum Srinivas <da...@gmail.com>.
Easiest solution would be to use a debugger (see
http://sys-con.com/story/?storyid=44918&DE=1 if you are using eclipse)
 and report back what's causing the problem.

thanks,
dims

On Wed, 16 Jun 2004 07:48:48 -0700 (PDT), Dasarath Weeratunge
<da...@yahoo.com> wrote:
> 
> Hi
> 
> I'm tring to use ws-fx/ws-addressing in my ws-at
> implementation. I generated stubs/skel using wsdl2java
> for
> wsat.wsdl and wscoor.wsdl for all namespaces except
> "http://schemas.xmlsoap.org/ws/2004/03/addressing"
> and then later renamed all occurances of
> org.xmlsoap.schemas.ws._2004._03.addressing.* to
> org.apache.axis.message.addressing.* in the stubs
> and the deploy.wsdd file. The code compiles but when
> run, gives the following exception. I have also
> attached the messages.
> 
> Earlier I was indeed using 2003/03/* addressing
> namespace but after the help I got from the mailing
> list I got the latest 2004/03/* addressing.xsd
> I'm using ws-addressing-1.0.jar built using a CVS
> checkout obtained today (16/06/2004). I'm using the
> Axis jars downloaded by maven
> when building ws-addressing.
> 
> What should I do about this? Are there any other
> places where I have to do alterations? I'm using the
> following schemas & wsdls
> wsat.wsdl, wsat.xsd, wscoor.wsdl, wscoor.xsd,
> utility.xsd, addressing.xsd
> 
> Note: wscoor.wsdl was using the earlier 2003/03
> addressing namespace. I renames it to use 2004/03
> before generating the classes
> 
> Thanks
> 
> Dasarath
> 
> log4j:WARN No appenders could be found for logger
> (org.apache.axis.i18n.ProjectResourceBundle).
> log4j:WARN Please initialize the log4j system
> properly.
> AxisFault
>  faultCode:
> {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>  faultSubcode:
>  faultString: java.lang.IllegalArgumentException:
> argument type mismatch
>  faultActor:
>  faultNode:
>  faultDetail:
> 
> {http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException:
> argument type mismatch
>         at
> org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:142)
>         at
> org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:248)
>         at
> org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:512)
>         at
> org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1060)
>         at
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
>         at
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1056)
>         at
> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
>         at
> org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
>         at org.apache.axis.client.Call.invoke(Call.java:2405)
>         at org.apache.axis.client.Call.invoke(Call.java:2304)
>         at org.apache.axis.client.Call.invoke(Call.java:1765)
>         at
> org.xmlsoap.schemas.ws._2003._09.wscoor.ActivationPortTypeRPCBindingStub.createCoordinationContextOperation(ActivationPortTypeRPCBindingStub.java:305)
>         at test.ws.Tester2Client.main(Tester2Client.java:36)
> 
>         {http://xml.apache.org/axis/}hostname:sarasavi-pub3
> 
> java.lang.IllegalArgumentException: argument type
> mismatch
>         at
> org.apache.axis.AxisFault.makeFault(AxisFault.java:99)
>         at org.apache.axis.client.Call.invoke(Call.java:2408)
>         at org.apache.axis.client.Call.invoke(Call.java:2304)
>         at org.apache.axis.client.Call.invoke(Call.java:1765)
>         at
> org.xmlsoap.schemas.ws._2003._09.wscoor.ActivationPortTypeRPCBindingStub.createCoordinationContextOperation(ActivationPortTypeRPCBindingStub.java:305)
>         at test.ws.Tester2Client.main(Tester2Client.java:36)
> Caused by: java.lang.IllegalArgumentException:
> argument type mismatch
>         at
> org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:142)
>         at
> org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:248)
>         at
> org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:512)
>         at
> org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1060)
>         at
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
>         at
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1056)
>         at
> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
>         at
> org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
>         at org.apache.axis.client.Call.invoke(Call.java:2405)
>         ... 4 more
> 
> ==============
> Listen Port: 8081
> Target Host: 127.0.0.1
> Target Port: 8080
> ==== Request ====
> POST /jboss-net/services/ActivationRPC HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime,
> multipart/related, text/*
> User-Agent: Axis/1.2beta
> Host: 127.0.0.1:8081
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction:
> "http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperation"
> Content-Length: 953
> 
> <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"
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
>    <soapenv:Header>
>       <wsa:MessageID
> soapenv:mustUnderstand="0">uuid:4E562D20-BFA1-11D8-91B1-81AA077BEC57</wsa:MessageID>
>       <wsa:To
> soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC</wsa:To>
>       <wsa:Action
> soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperation</wsa:Action>
>       <wsa:From>
> 
> <wsa:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:Address>
>       </wsa:From>
>    </soapenv:Header>
>    <soapenv:Body>
>       <CreateCoordinationContext
> xmlns="http://schemas.xmlsoap.org/ws/2003/09/wscoor">
> 
> <CoordinationType>http://schemas.xmlsoap.org/ws/2003/09/wsat</CoordinationType>
>       </CreateCoordinationContext>
>    </soapenv:Body></soapenv:Envelope>
> 
> ==== Response ====
> HTTP/1.1 200 OK
> Content-Type: text/xml;charset=utf-8
> Date: Wed, 16 Jun 2004 14:27:33 GMT
> Server: Apache-Coyote/1.1
> Connection: close
> 
> <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"
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
>    <soapenv:Header>
>       <wsa:MessageID
> soapenv:mustUnderstand="0">uuid:4E7C52C0-BFA1-11D8-8DD7-98C10D532353</wsa:MessageID>
>       <wsa:To
> soapenv:mustUnderstand="0">http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
>       <wsa:Action
> soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperationResponse</wsa:Action>
>       <wsa:From>
> 
> <wsa:Address>http://localhost:8081/jboss-net/services/ActivationRPC</wsa:Address>
>       </wsa:From>
>       <ns0:RelatesTo RelationshipType="wsa:Reply"
> soapenv:mustUnderstand="0"
> xmlns:ns0="http://schemas.xmlsoap.org/ws/2004/03/addressing">uuid:4E562D20-BFA1-11D8-91B1-81AA077BEC57</ns0:RelatesTo>
>    </soapenv:Header>
>    <soapenv:Body>
>       <CreateCoordinationContextResponse
> xmlns="http://schemas.xmlsoap.org/ws/2003/09/wscoor">
>          <CoordinationContext>
>             <ns1:Identifier
> xmlns:ns1="http://schemas.xmlsoap.org/ws/2002/07/utility">xid:258-1087396053468-0</ns1:Identifier>
> 
> <CoordinationType>http://schemas.xmlsoap.org/ws/2003/09/wsat</CoordinationType>
>             <RegistrationService>
>                <wsa:Address
> xsi:type="xsd:anyURI">http://localhost:8081/jboss-net/services/RegistrationRPC</wsa:Address>
>                <wsa:ReferenceProperties>
>                   <wsu:Identifier
> xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">xid:258-1087396053468-0</wsu:Identifier>
>                </wsa:ReferenceProperties>
>             </RegistrationService>
>          </CoordinationContext>
>       </CreateCoordinationContextResponse>
>    </soapenv:Body></soapenv:Envelope>
> ==============
> 
> --- Jarek Gawor <ga...@mcs.anl.gov> wrote:
> > Deleting generated classes should work ok. With
> > wsdl2java you can exclude a
> > namespace so that the classes for the given
> > namespace are not generated in
> > the first place. That can be done with "-x" option,
> > for example: -x
> > http://schemas.xmlsoap.org/ws/2004/03/addressing
> >
> > Btw, please notice that the latest addressing code
> > is based on the 2004
> > version of the specification (the ../2004/03/..
> > namespace). Are the specs
> > you are working on using the same ws-addressing
> > namespace?
> >
> > Jarek
> >
> > > -----Original Message-----
> > > From: Dasarath Weeratunge
> > [mailto:dasarathweeratunge@yahoo.com]
> > > Sent: Tuesday, June 15, 2004 12:42 PM
> > > To: fx-dev@ws.apache.org
> > > Subject: Using ws-addressing impl
> > >
> > >
> > > Hi
> > >
> > > I'm using ws-fx/ws-addressing impl in the
> > ws-atomic
> > > transaction impl that I'm working on. Using
> > wsdl2java
> > > I generated stubs/impl classes for wsdls ws-at &
> > > ws-coor. These classes also contain classes from
> > > ws-addressing.xsd also found in
> > ws-fx/ws-addressing impl.
> > >
> > > I notice that there are some differences b/w the
> > > generated classes and their ws-fx/ws-addressing
> > impl
> > > counterparts like the interfaces they implement.
> > Still I went
> > > ahead and refactored my code to use
> > ws-fx/ws-addressing impl
> > > classes rather than the generated ones. Now the
> > code compiles
> > > but I get AxisFaults - when the messages are
> > de-serialized.
> > >
> > > Is it possible to use ws-fx/ws-addressing impl
> > classes
> > > in place of generated classes from addressing.xsd?
> > If
> > > so, how should I do it? Being new to wsdl/axis
> > area, I
> > > simply mapped the namespace
> > > "http://schemas.xmlsoap.org/ws/2003/03/addressing"
> > to
> > > org.apache.axis.message.addressing when using
> > wsdl2java and
> > > later deleted the generated classes - this doesn't
> > work.
> > >
> > > Thanks
> > >
> > > Dasarath
> > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > New and Improved Yahoo! Mail - 100MB free storage!
> >
> > > http://promotions.yahoo.com/new_mail
> > >
> > >
> >
> >
> 
> 
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

RE: Using ws-addressing impl (need more help!)

Posted by Dasarath Weeratunge <da...@yahoo.com>.
Hi

I'm tring to use ws-fx/ws-addressing in my ws-at
implementation. I generated stubs/skel using wsdl2java
for
wsat.wsdl and wscoor.wsdl for all namespaces except
"http://schemas.xmlsoap.org/ws/2004/03/addressing"
and then later renamed all occurances of
org.xmlsoap.schemas.ws._2004._03.addressing.* to
org.apache.axis.message.addressing.* in the stubs
and the deploy.wsdd file. The code compiles but when
run, gives the following exception. I have also
attached the messages.

Earlier I was indeed using 2003/03/* addressing
namespace but after the help I got from the mailing
list I got the latest 2004/03/* addressing.xsd
I'm using ws-addressing-1.0.jar built using a CVS
checkout obtained today (16/06/2004). I'm using the
Axis jars downloaded by maven 
when building ws-addressing.

What should I do about this? Are there any other
places where I have to do alterations? I'm using the
following schemas & wsdls
wsat.wsdl, wsat.xsd, wscoor.wsdl, wscoor.xsd,
utility.xsd, addressing.xsd

Note: wscoor.wsdl was using the earlier 2003/03
addressing namespace. I renames it to use 2004/03
before generating the classes

Thanks

Dasarath


log4j:WARN No appenders could be found for logger
(org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system
properly.
AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.IllegalArgumentException:
argument type mismatch
 faultActor: 
 faultNode: 
 faultDetail: 

{http://xml.apache.org/axis/}stackTrace:java.lang.IllegalArgumentException:
argument type mismatch
	at
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:142)
	at
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:248)
	at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:512)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1060)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1056)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
	at org.apache.axis.client.Call.invoke(Call.java:2405)
	at org.apache.axis.client.Call.invoke(Call.java:2304)
	at org.apache.axis.client.Call.invoke(Call.java:1765)
	at
org.xmlsoap.schemas.ws._2003._09.wscoor.ActivationPortTypeRPCBindingStub.createCoordinationContextOperation(ActivationPortTypeRPCBindingStub.java:305)
	at test.ws.Tester2Client.main(Tester2Client.java:36)

	{http://xml.apache.org/axis/}hostname:sarasavi-pub3

java.lang.IllegalArgumentException: argument type
mismatch
	at
org.apache.axis.AxisFault.makeFault(AxisFault.java:99)
	at org.apache.axis.client.Call.invoke(Call.java:2408)
	at org.apache.axis.client.Call.invoke(Call.java:2304)
	at org.apache.axis.client.Call.invoke(Call.java:1765)
	at
org.xmlsoap.schemas.ws._2003._09.wscoor.ActivationPortTypeRPCBindingStub.createCoordinationContextOperation(ActivationPortTypeRPCBindingStub.java:305)
	at test.ws.Tester2Client.main(Tester2Client.java:36)
Caused by: java.lang.IllegalArgumentException:
argument type mismatch
	at
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:142)
	at
org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:248)
	at
org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:512)
	at
org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:1060)
	at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
	at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1056)
	at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
	at
org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
	at org.apache.axis.client.Call.invoke(Call.java:2405)
	... 4 more


==============
Listen Port: 8081
Target Host: 127.0.0.1
Target Port: 8080
==== Request ====
POST /jboss-net/services/ActivationRPC HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime,
multipart/related, text/*
User-Agent: Axis/1.2beta
Host: 127.0.0.1:8081
Cache-Control: no-cache
Pragma: no-cache
SOAPAction:
"http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperation"
Content-Length: 953

<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"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
   <soapenv:Header>
      <wsa:MessageID
soapenv:mustUnderstand="0">uuid:4E562D20-BFA1-11D8-91B1-81AA077BEC57</wsa:MessageID>
      <wsa:To
soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC</wsa:To>
      <wsa:Action
soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperation</wsa:Action>
      <wsa:From>
        
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:Address>
      </wsa:From>
   </soapenv:Header>
   <soapenv:Body>
      <CreateCoordinationContext
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wscoor">
        
<CoordinationType>http://schemas.xmlsoap.org/ws/2003/09/wsat</CoordinationType>
      </CreateCoordinationContext>
   </soapenv:Body></soapenv:Envelope>


==== Response ====
HTTP/1.1 200 OK
Content-Type: text/xml;charset=utf-8
Date: Wed, 16 Jun 2004 14:27:33 GMT
Server: Apache-Coyote/1.1
Connection: close

<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"
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
   <soapenv:Header>
      <wsa:MessageID
soapenv:mustUnderstand="0">uuid:4E7C52C0-BFA1-11D8-8DD7-98C10D532353</wsa:MessageID>
      <wsa:To
soapenv:mustUnderstand="0">http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
      <wsa:Action
soapenv:mustUnderstand="0">http://localhost:8081/jboss-net/services/ActivationRPC#CreateCoordinationContextOperationResponse</wsa:Action>
      <wsa:From>
        
<wsa:Address>http://localhost:8081/jboss-net/services/ActivationRPC</wsa:Address>
      </wsa:From>
      <ns0:RelatesTo RelationshipType="wsa:Reply"
soapenv:mustUnderstand="0"
xmlns:ns0="http://schemas.xmlsoap.org/ws/2004/03/addressing">uuid:4E562D20-BFA1-11D8-91B1-81AA077BEC57</ns0:RelatesTo>
   </soapenv:Header>
   <soapenv:Body>
      <CreateCoordinationContextResponse
xmlns="http://schemas.xmlsoap.org/ws/2003/09/wscoor">
         <CoordinationContext>
            <ns1:Identifier
xmlns:ns1="http://schemas.xmlsoap.org/ws/2002/07/utility">xid:258-1087396053468-0</ns1:Identifier>
           
<CoordinationType>http://schemas.xmlsoap.org/ws/2003/09/wsat</CoordinationType>
            <RegistrationService>
               <wsa:Address
xsi:type="xsd:anyURI">http://localhost:8081/jboss-net/services/RegistrationRPC</wsa:Address>
               <wsa:ReferenceProperties>
                  <wsu:Identifier
xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility">xid:258-1087396053468-0</wsu:Identifier>
               </wsa:ReferenceProperties>
            </RegistrationService>
         </CoordinationContext>
      </CreateCoordinationContextResponse>
   </soapenv:Body></soapenv:Envelope>
==============











--- Jarek Gawor <ga...@mcs.anl.gov> wrote:
> Deleting generated classes should work ok. With
> wsdl2java you can exclude a
> namespace so that the classes for the given
> namespace are not generated in
> the first place. That can be done with "-x" option,
> for example: -x
> http://schemas.xmlsoap.org/ws/2004/03/addressing
> 
> Btw, please notice that the latest addressing code
> is based on the 2004
> version of the specification (the ../2004/03/..
> namespace). Are the specs
> you are working on using the same ws-addressing
> namespace? 
> 
> Jarek
> 
> > -----Original Message-----
> > From: Dasarath Weeratunge
> [mailto:dasarathweeratunge@yahoo.com] 
> > Sent: Tuesday, June 15, 2004 12:42 PM
> > To: fx-dev@ws.apache.org
> > Subject: Using ws-addressing impl
> > 
> > 
> > Hi
> > 
> > I'm using ws-fx/ws-addressing impl in the
> ws-atomic
> > transaction impl that I'm working on. Using
> wsdl2java
> > I generated stubs/impl classes for wsdls ws-at &
> > ws-coor. These classes also contain classes from 
> > ws-addressing.xsd also found in
> ws-fx/ws-addressing impl.
> > 
> > I notice that there are some differences b/w the
> > generated classes and their ws-fx/ws-addressing
> impl 
> > counterparts like the interfaces they implement.
> Still I went 
> > ahead and refactored my code to use
> ws-fx/ws-addressing impl 
> > classes rather than the generated ones. Now the
> code compiles 
> > but I get AxisFaults - when the messages are
> de-serialized.
> > 
> > Is it possible to use ws-fx/ws-addressing impl
> classes
> > in place of generated classes from addressing.xsd?
> If
> > so, how should I do it? Being new to wsdl/axis
> area, I
> > simply mapped the namespace 
> > "http://schemas.xmlsoap.org/ws/2003/03/addressing"
> to 
> > org.apache.axis.message.addressing when using
> wsdl2java and 
> > later deleted the generated classes - this doesn't
> work.
> > 
> > Thanks
> > 
> > Dasarath
> > 
> > 
> > 
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - 100MB free storage!
> 
> > http://promotions.yahoo.com/new_mail 
> > 
> > 
> 
> 



		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 

RE: Using ws-addressing impl

Posted by Jarek Gawor <ga...@mcs.anl.gov>.
Deleting generated classes should work ok. With wsdl2java you can exclude a
namespace so that the classes for the given namespace are not generated in
the first place. That can be done with "-x" option, for example: -x
http://schemas.xmlsoap.org/ws/2004/03/addressing

Btw, please notice that the latest addressing code is based on the 2004
version of the specification (the ../2004/03/.. namespace). Are the specs
you are working on using the same ws-addressing namespace? 

Jarek

> -----Original Message-----
> From: Dasarath Weeratunge [mailto:dasarathweeratunge@yahoo.com] 
> Sent: Tuesday, June 15, 2004 12:42 PM
> To: fx-dev@ws.apache.org
> Subject: Using ws-addressing impl
> 
> 
> Hi
> 
> I'm using ws-fx/ws-addressing impl in the ws-atomic
> transaction impl that I'm working on. Using wsdl2java
> I generated stubs/impl classes for wsdls ws-at &
> ws-coor. These classes also contain classes from 
> ws-addressing.xsd also found in ws-fx/ws-addressing impl.
> 
> I notice that there are some differences b/w the
> generated classes and their ws-fx/ws-addressing impl 
> counterparts like the interfaces they implement. Still I went 
> ahead and refactored my code to use ws-fx/ws-addressing impl 
> classes rather than the generated ones. Now the code compiles 
> but I get AxisFaults - when the messages are de-serialized.
> 
> Is it possible to use ws-fx/ws-addressing impl classes
> in place of generated classes from addressing.xsd? If
> so, how should I do it? Being new to wsdl/axis area, I
> simply mapped the namespace 
> "http://schemas.xmlsoap.org/ws/2003/03/addressing" to 
> org.apache.axis.message.addressing when using wsdl2java and 
> later deleted the generated classes - this doesn't work.
> 
> Thanks
> 
> Dasarath
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage! 
> http://promotions.yahoo.com/new_mail 
> 
>