Hi Dave,

 

If you want your complex types to be in the same namespace as your
service, you'll need to specifically declare that namespace for each
complex type.  The easiest way to do this is by using annotations on the
Java classes for each type:

 

http://xfire.codehaus.org/Aegis+Java+5+Annotations

 

-Chris

 

-----Original Message-----
From: Dave Kallstrom [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 24, 2007 11:24 AM
To: [email protected]
Subject: [xfire-user] A namespace question

 

I have a question concering the wsdl that xfire is generating. I am
using jsr181 annotations and xfire 1.2.4
Here is my annotation 
@WebService(name = "MyServices", targetNamespace=targetNamespace="
http://www.mysite.com/2007/01/01/ <http://www.mysite.com/2007/01/01/> ")

The wsdl being generated is in fact correct 
<wsdl:definitions targetNamespace="http://www.mysite.com/2007/01/01/ ">

However I have several complex types that do not use this namespace.
They are getting their namespace form the java package that they are
contained in.
Similar to the following.
<xsd:schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="
http://api.search.mypackage";>

All of my web service methods are defined like this
@WebResult(name = "MethodName",  " http://www.mysite.com/2007/01/01/
<http://www.mysite.com/2007/01/01/> ")

When I generate client code using xfires wsgen ant task I get the proper
code generated and have no problems writing a client in java.
However when I run wsdl.exe from .NET it complains about these
namespaces but generates C# code just fine and I am also able to write a
client in C#. 

So is this an xfire bug or are complex types supposed to take their
namespace from the java package? 
As  you can tell from my question I am new to webservices.
Any help would be appreciated.

-- 
Dave Kallstrom 

Reply via email to