We have a service that was implemented using .NET WCF and I am calling it from a client running in Mule 3.
When I call the service, it throws an exception that service is expecting " content header set to text/xml; charset=utf-8 " but my client is sending "text/plain".
Any thoughts on how I can resolve this? The code to call the service is below.
Service service = Service.create(QName.valueOf(connector.getServiceUrl()));
service.addPort(new QName(connector.getServiceNameSpace(),
connector.getServicePort()),
SOAPBinding.SOAP11HTTP_BINDING,
connector.getServiceUrl());
service.getPort(new QName(connector.getServiceNameSpace(),
connector.getServicePort()),
ConnectorService.class);
Thanks
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Suneet
I am trying to create a client using the example in the link provided, but I am getting the exception below. Any thoughts on what i am doing wrong?
QName SERVICE_NAME = new QName("http://www.openiam.org/service/connector", "ActiveDirectoryConnector");
QName PORT_NAME = new QName("http://www.openiam.org/service/connector", "BasicHttpBinding_ConnectorService");
String endpointAddress = "http://win2003.iamdev.local/ServiceHost/ActiveDirectoryConnector.svc";
Service service = Service.create(SERVICE_NAME);
// Add a port to the Service
service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
ConnectorService connector = service.getPort(ConnectorService.class);
System.out.println(connector.add(addReqType));
Exception:
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:48)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
at $Proxy60.add(Unknown Source)
at org.openiam.mule.functional.ServiceClientTest.main(ServiceClientTest.java:41)
Caused by: java.net.MalformedURLException: Invalid address. Endpoint address cannot be null.
at org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:820)
at org.apache.cxf.transport.http.HTTPConduit.getURL(HTTPConduit.java:805)
at org.apache.cxf.transport.http.HTTPConduit.setupURL(HTTPConduit.java:732)
at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:485)
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
... 8 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not send Message.
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
at $Proxy60.add(Unknown Source)