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 Jai Sharma <ja...@gmail.com> on 2006/06/22 08:09:39 UTC
inheader attribute question
I have defined a service as below in my wsdd file.
<service name="MyService" provider="java:RPC" style="wrapped" use="literal">
<parameter name="className" value="
com.ext.portlet.mr.service.xbreeze.MyServiceSoap"/>
<operation xmlns:operNS="urn:myservice.service.mr.portlet.ext.com"
xmlns:rtns=" http://www.w3.org/2001/XMLSchema" name="addUser"
qname="operNS:addUser" returnQName="operNS:addUserReturn"
returnType="rtns:string" soapAction="">
<parameter xmlns:tns="http://www.w3.org/2001/XMLSchema"
qname="domainUserId" type="tns:string"></parameter>
<parameter inHeader="true" xmlns:tns="
http://www.w3.org/2001/XMLSchema" qname="password"
type="tns:string"></parameter>
</operation>
<parameter name="allowedMethods" value="addUser"/>
</service>
I have defined the parameter "password" to be in soap header and not in
body.
Since i do not expect the header parameter in my Service class so i defined
the service class as
public class MyServiceSoap {
public static String addUser(String domainUserId)
throws RemoteException {
return domainUserId;
}
}
If i deploy this i and try and view the wsdl i get axis error. Instead if I
define it as below there is no error.
public class MyServiceSoap {
public static String addUser(String domainUserId, String password)
throws RemoteException {
return domainUserId;
}
}
My requirement is that this header parameter need not be declared in the
method call as i want it be a similar to what i have coded in the impl class
please let me know if i am doing it wrong.
-jai