Hi Olivier,
The WS-I basic profile draft is where the use of imports in WSDL is being
clarified, see requirements R2001 to R2004:
http://www.ws-i.org/Profiles/Basic/2003-01/BasicProfile-1.0-WGAD.html#WSDLDOCSTRUCT
However there's been no discussions on WSIF policing any of the WS-I basic
profile requirements yet.
WSIF does support imports, and it seemed to be working ok when I tried your
testcase last week, I'll go back and have another look at this later today.
It also looked like it was working ok for both the SOAP and Java bindings
for me, WSIF should sort out the type mappings for you automatically. How
have you generated the Java classes for the complex types defined in the
WSDL? And what is the error you get on the client when
serializing/deserializing complex types?
...ant
Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories, Hursley Park
(+44) 01962 818320, x248320, MP208.
"Brand, Olivier" <[EMAIL PROTECTED]> on 17/03/2003 07:35:45
Please respond to [EMAIL PROTECTED]
To: Anthony Elder/UK/[EMAIL PROTECTED]
cc: <[EMAIL PROTECTED]>
Subject: RE: Error when calling a method on a stub !!
Thanks Anthony.
I have done 2 things to make everything works:
1) Change the package name (as suggested)
2) Remove the wsdl imports of my schemas, it seems that WSIF does not
support these. I have read in some obscur mailing lists that WSDL1.2 does
not recommend (support?) import of schemas.
Now I have a new problem: my Java binding works just fine but the SOAP one
does not. After looking more in the mailing list, I found out that the
problem of serializing/deserializing complex types is a problem on the
client side. I saw something about JROM but this was very cryptic to me.
So my question will be:
1) Is it possible to use the SOAP binding in my case ?
2) If not possible, can I use a JAVA binding tied to the stub class
generated by Axis (which contains serializer/deserializer info), in this
case the SOAP binding will never be used directly.
Olivier Brand
-----Original Message-----
From: Anthony Elder [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 6:12 PM
To: Brand, Olivier
Cc: [EMAIL PROTECTED]
Subject: Re: Error when calling a method on a stub !!
Hi Olivier,
The problem is that WSIF is not looking for the Java classes for the
complex types in the correct package.
For example the namespace for item is xmlns:item
="http://global.vodafone.com/schemas/charging/item", unless you override
the default mappings then based on that namespace WSIF will look for a
classes in that namespace with a package name of
"com.vodafone.global.schemas.charging.item".
This clearly isn't where you have them as the import in your testcase is
import com.vodafone.global.charging.item.ItemType;
which explains why WSIF didn't find them. In the WSDL you do have a format
binding with typeMaps which map these types correctly, for example:
<format:typeMap typeName="item:itemType" formatType
="com.vodafone.global.charging.item.ItemType"/>
But unfortunately that doesn't help as the WSIFDymanicProxy code that is
used for the dynamic stubs is binding independent so doesn't know about the
format typemap in the binding.
As a work around you should be able to make this work by having explicit
mapType calls in you client code, for example:
wsifService.mapType(
new QName
("http://global.vodafone.com/schemas/charging/item","itemType"),
ItemType.class);
Looks like you've tried to do something similar with a mapPackage which is
commented out in your testcase which used just the root package name.
Unfortunately that wont work unless you do a map package for every
namespace mapping it to a complete package name.
So there's two failings in WSIF here really:
1 - WSIFDynamicProxy needs to get any format binding type mappings from the
WSIFPort its using, and use these when matching the operation method
signature. Which will be tricky as theres nothing for this on the WSIFPort
interface.
2 - it would be nice if mapPackage allowed some sort of wildcard suffix on
namespace and package names. Something like:
mapPackage("http://global.vodafone.com/*", "com.vodafone.global.*");
If you raise a bugzilla for this we wil try to fix this for you.
...ant
Anthony Elder
[EMAIL PROTECTED]
Web Services Development
IBM UK Laboratories, Hursley Park
(+44) 01962 818320, x248320, MP208.
"Brand, Olivier" <[EMAIL PROTECTED]> on 14/03/2003 14:33:13
To: Anthony Elder/UK/[EMAIL PROTECTED]
cc:
Subject: Refining WSIF error
I have debugged the WSIF2.0 findMatchingOperation() in the WSIFClientProxy
class and I found out that the typeMap is empty !!
Obviously, my XML Schemas have not been registered through the WSIF
framework....
Strange.
Thanks for any help
Olivier Brand
Senior Java Architect - Mobile Services and Integration
Global IT & Technology Management
Vodafone AG
Mannesmannufer 3 - 40213 Dusseldorf - Germany
Mobile: +49 172 2094646
E-Mail: [EMAIL PROTECTED]