Did you regenerate the server side code ? From the stack trace , I think the server did not use the implementor class which contains soap header parameter ?
Could you check it ?

-Jim

exgorth wrote:
One more..

I've generated stubs with:
wsdl2java -d .\generated -exsh true -client
http://touralliance.bronni.ru/Loader.asmx?wsdl


And whee invoking generated client i'm getting:

INFO: Creating Service {http://tourml.ru/service/2006-03-14}Loader from
WSDL: http://touralliance.bronni.ru/Loader.asmx?wsdl
Exception in thread "main" javax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Could not find
a message part matching name
{http://tourml.ru/serviceSecurity/2006-03-14/}UserSessionId.  Possible
values are [{http://tourml.ru/service/2006-03-14}UserSessionId].
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:243)
        at javax.xml.ws.Service.getPort(Service.java:94)
        at ru.tourml.service._2006_03_14.Loader.getLoaderSoap(Loader.java:51)
        at ru.invito.ws.client.bronni.App.main(App.java:49)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
Could not find a message part matching name
{http://tourml.ru/serviceSecurity/2006-03-14/}UserSessionId.  Possible
values are [{http://tourml.ru/service/2006-03-14}UserSessionId].
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeParameter(JaxWsServiceFactoryBean.java:391)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeClassInfo(JaxWsServiceFactoryBean.java:358)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:173)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:319)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:182)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:211)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:262)
        at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:143)
        at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:89)
        at
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:81)
        at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:50)
        at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:89)
        at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:336)
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:241)
        ... 3 more




Jim Ma-3 wrote:
Hi exgorth ,

You use the "wsdl2java -exsh true " to generate the parameter for soap header .

Regards

Jim

exgorth wrote:
The service i'm trying to access accepts the auth info in custom way -
client
must specify a soap:header with login:password pair and receive a token,
that must be included as soap:header in all further requests.

The problem that in generated code (wsdl2java) any info about that is not
present.

In XFIRE 1.2.4 the generated method was:

@WebMethod(operationName = "Search", action =
"http://tourml.ru/service/2006-03-14/Search";)
@WebResult(name = "TourML", targetNamespace =
"http://tourml.ru/products/2004-04-19";)
public TourML search(
  @WebParam(name = "request", targetNamespace =
"http://tourml.ru/query-request/2004-07-07";)
  Request request,
  @WebParam(name = "UserSessionId", targetNamespace =
"http://tourml.ru/serviceSecurity/2006-03-14/";, header = true)
  ru.tourml.servicesecurity._2006_03_14.UserSessionId UserSessionId);

but in CFX-2.0.1:

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebMethod(action = "http://tourml.ru/service/2006-03-14/Search";,
operationName = "Search")
@WebResult(targetNamespace = "http://tourml.ru/service/2006-03-14";,
partName
= "parameters", name = "SearchResponse")
public ru.tourml.service._2006_03_14.SearchResponse search(
  @WebParam(targetNamespace = "http://tourml.ru/service/2006-03-14";,
partName = "parameters", name = "Search")
  ru.tourml.service._2006_03_14.Search parameters);

the UserSessionId is not present as argument.

How can i supply the request with the required header? Why it doesn't
present in generated API?




Reply via email to