You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by GRESSIER Yoan <yo...@sncf.fr> on 2003/05/21 11:17:49 UTC

Creating AXIS web service waiting for complex type

How can i deploy in AXIS a web service waiting for a comples type as
parameters ?

Here is my complex type :
public class Couple {
  int x, y;
  public Couple( int i, int j )   {       x = i; y = j;  }
}


Here is my WS : 
public class HelloWorld
{
  public int add( Couple c )
  {
    return c.x + c.y;
  }
}

Here is the WSDD file used to deploy it with the command :java
org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
            xmlns:ns1="HelloWorldTest" >

 <service name="HelloWorldTest" provider="java:RPC">
  <parameter name="className" value="HelloWorld"/>
  <parameter name="allowedMethods" value="*"/>
 </service>
</deployment>


I add that i have put the .class file in the "webapps\axis\WEB-INF\classes"
folder of tomcat


When i deploy it with a wsdd file, i get the following error while accessing
to the WSDL file : 

AXIS error
Sorry, something seems to have gone wrong... here are the details:
Fault - ; nested exception is: 
	WSDLException: faultCode=OTHER_ERROR: Can&apos;t find prefix for
&apos;http://DefaultNamespace&apos;. Namespace prefixes must be set on the
Definition object using the addNamespace(...) method.: 
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: WSDLException: faultCode=OTHER_ERROR: Can&apos;t find prefix
for &apos;http://DefaultNamespace&apos;. Namespace prefixes must be set on
the Definition object using the addNamespace(...) method.: 
 faultActor: 
 faultNode: 
 faultDetail:

Can somebody help me ? Thanks a lot

Yoan