1 2 Previous Next 24 Replies Latest reply on Nov 18, 2008 1:03 PM by jeckles933

    Problem consuming .net webservice with jbossws-3.0.1-native-

      Hi,

      I created the stubs classes of .net webservice using ant task:

      org.jboss.wsf.spi.tools.ant.WSConsumeTask


      But when I invoke the .net webservice I got:

      javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
      Exception in thread "main" javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
       at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:404)
       at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:314)
       at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
       at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
       at $Proxy15.getToken(Unknown Source)
       at teste.Teste.getXY(Teste.java:26)
       at teste.Teste.main(Teste.java:73)
      Caused by: java.io.IOException: Could not transmit message
       at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:255)
       at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:73)
       at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
       at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
       ... 5 more
      Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
       at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:333)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.Client.invoke(Client.java:1634)
       at org.jboss.remoting.Client.invoke(Client.java:548)
       at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:233)
       ... 8 more
      Caused by: org.jboss.ws.WSException: Invalid HTTP server response [501] - Not Implemented
       at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:77)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:473)
       at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:305)
       ... 13 more


      With the release jbossws 2.0.0.GA the calls are made successfully.
      Please, help me.
      Thanks

        • 1. Re: Problem consuming .net webservice with jbossws-3.0.1-nat
          ropalka

          Could you post exchanged messages?

          • 2. Re: Problem consuming .net webservice with jbossws-3.0.1-nat

            How can I do this?
            Please, show me a sample code.
            Thanks

            • 3. Re: Problem consuming .net webservice with jbossws-3.0.1-nat
              ropalka
              • 4. Re: Problem consuming .net webservice with jbossws-3.0.1-nat

                I added the log4j with DEBUG level:

                16/04/2008 13:21:03 org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder - START buildMetaData: [service={http://webservices.maplink2.com.br}Authentication]
                16/04/2008 13:21:03 org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory - parse: http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx?WSDL
                16/04/2008 13:21:04 org.jboss.wsf.framework.DefaultSPIProvider - provide SPI 'class org.jboss.wsf.spi.management.ServerConfigFactory'
                16/04/2008 13:21:04 org.jboss.wsf.framework.DefaultSPIProvider - class org.jboss.wsf.spi.management.ServerConfigFactory Implementation: org.jboss.wsf.framework.management.ServerConfigFactoryImpl@1a06e38
                16/04/2008 13:21:04 org.jboss.ws.tools.JavaToXSD - Load schema: http://webservices.maplink2.com.br=file:/C:/DOCUME~1/claudior/CONFIG~1/Temp/JBossWS_webservices.maplink2.com.br52730.xsd
                16/04/2008 13:21:04 org.jboss.ws.core.utils.JBossWSEntityResolver - resolveEntity: [pub=null,sysid=file:/C:/DOCUME~1/claudior/CONFIG~1/Temp/JBossWS_webservices.maplink2.com.br52730.xsd]
                16/04/2008 13:21:04 org.jboss.ws.core.utils.JBossWSEntityResolver - resolveEntity: [pub=http://schemas.xmlsoap.org/soap/encoding/,sysid=null]
                16/04/2008 13:21:05 org.jboss.ws.metadata.wsdl.WSDLDefinitions - Multiple WSDL bindings referrence the same interface: {http://webservices.maplink2.com.br}AuthenticationSoap
                16/04/2008 13:21:05 org.jboss.ws.metadata.wsdl.WSDLDefinitions - Multiple WSDL bindings referrence the same interface: {http://webservices.maplink2.com.br}AuthenticationSoap
                16/04/2008 13:21:05 org.jboss.ws.metadata.wsdl.WSDLDefinitions - Multiple WSDL bindings referrence the same interface: {http://webservices.maplink2.com.br}AuthenticationSoap
                16/04/2008 13:21:05 org.jboss.ws.metadata.wsdl.WSDLDefinitions - Multiple WSDL bindings referrence the same interface: {http://webservices.maplink2.com.br}AuthenticationSoap
                16/04/2008 13:21:05 org.jboss.ws.metadata.wsdl.WSDLDefinitions - Multiple WSDL bindings referrence the same interface: {http://webservices.maplink2.com.br}AuthenticationSoap
                16/04/2008 13:21:05 org.jboss.ws.metadata.wsdl.WSDLDefinitions - Multiple WSDL bindings referrence the same interface: {http://webservices.maplink2.com.br}AuthenticationSoap
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - Using default parameter style: WRAPPED
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - Using default parameter style: WRAPPED
                16/04/2008 13:21:05 org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder - END buildMetaData:
                UnifiedMetaData:
                 implementation: jbossws-3.0.1-native-2.0.4.GA (build=200803312044)
                 deploymentName: null
                 securityDomain: null
                
                ServiceMetaData:
                 qname={http://webservices.maplink2.com.br}Authentication
                 refName=null
                 wsdName=null
                 wsdlFile=null
                 wsdlLocation=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx?WSDL
                 jaxrpcMapping=null
                 publishLocation=null
                 securityConfig=null
                 properties=null
                
                TypesMetaData:
                <schema targetNamespace='http://webservices.maplink2.com.br' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://webservices.maplink2.com.br' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
                 <element name='getToken'>
                 <complexType>
                 <sequence>
                 <element maxOccurs='1' minOccurs='0' name='user' type='string'/>
                 <element maxOccurs='1' minOccurs='0' name='pwd' type='string'/>
                 </sequence>
                 </complexType>
                 </element>
                 <element name='getTokenResponse'>
                 <complexType>
                 <sequence>
                 <element maxOccurs='1' minOccurs='0' name='getTokenResult' type='string'/>
                 </sequence>
                 </complexType>
                 </element>
                </schema>
                
                
                ClientEndpointMetaData:
                 type=JAXWS
                 qname={http://webservices.maplink2.com.br}AuthenticationSoap
                 address=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx
                 binding=http://www.w3.org/2003/05/soap/bindings/HTTP/
                 seiName=null
                 configFile=META-INF/standard-jaxws-client-config.xml
                 configName=Standard Client
                 authMethod=null
                 properties={}
                
                OperationMetaData:
                 qname={http://webservices.maplink2.com.br}getToken
                 javaName={http://webservices.maplink2.com.br}getToken
                 style=document/literal/WRAPPED
                 oneWay=false
                 soapAction=http://webservices.maplink2.com.br/getToken
                ClientEndpointMetaData:
                 type=JAXWS
                 qname={http://webservices.maplink2.com.br}AuthenticationSoap12
                 address=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx
                 binding=http://www.w3.org/2003/05/soap/bindings/HTTP/
                 seiName=null
                 configFile=META-INF/standard-jaxws-client-config.xml
                 configName=Standard Client
                 authMethod=null
                 properties={}
                
                OperationMetaData:
                 qname={http://webservices.maplink2.com.br}getToken
                 javaName={http://webservices.maplink2.com.br}getToken
                 style=document/literal/WRAPPED
                 oneWay=false
                 soapAction=http://webservices.maplink2.com.br/getToken
                16/04/2008 13:21:05 org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder - START: rebuildMetaData
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - setParameterStyle: null
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - Create new config [name=Standard Client,file=META-INF/standard-jaxws-client-config.xml]
                16/04/2008 13:21:05 org.jboss.ws.metadata.config.JBossWSConfigFactory - getConfig: [name=Standard Client,url=META-INF/standard-jaxws-client-config.xml]
                16/04/2008 13:21:05 org.jboss.ws.metadata.config.JBossWSConfigFactory - parse: jar:file:/C:/eclipse/workspace/GeradorWsClient204/lib/jbossws-client.jar!/META-INF/standard-jaxws-client-config.xml
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - Configure EndpointMetaData
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - Added 0 PRE handlers
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - Added 0 ENDPOINT handlers
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - Added 0 POST handlers
                16/04/2008 13:21:05 org.jboss.ws.metadata.umdm.EndpointMetaData - setParameterStyle: WRAPPED
                16/04/2008 13:21:05 org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder - JAXBContext [types=[class ws.maplink.authentication.GetToken, class ws.maplink.authentication.GetTokenResponse],tns=http://webservices.maplink2.com.br]
                16/04/2008 13:21:06 org.jboss.ws.metadata.umdm.OperationMetaData - Found best matching java method: public abstract java.lang.String ws.maplink.authentication.AuthenticationSoap.getToken(java.lang.String,java.lang.String)
                16/04/2008 13:21:06 org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder - END: rebuildMetaData
                
                ServiceMetaData:
                 qname={http://webservices.maplink2.com.br}Authentication
                 refName=null
                 wsdName=null
                 wsdlFile=null
                 wsdlLocation=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx?WSDL
                 jaxrpcMapping=null
                 publishLocation=null
                 securityConfig=null
                 properties=null
                
                TypesMetaData:
                 [complexType={http://webservices.maplink2.com.br}getToken,javaType=ws.maplink.authentication.GetToken]
                 [complexType={http://webservices.maplink2.com.br}getTokenResponse,javaType=ws.maplink.authentication.GetTokenResponse]
                <schema targetNamespace='http://webservices.maplink2.com.br' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://webservices.maplink2.com.br' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
                 <element name='getToken'>
                 <complexType>
                 <sequence>
                 <element maxOccurs='1' minOccurs='0' name='user' type='string'/>
                 <element maxOccurs='1' minOccurs='0' name='pwd' type='string'/>
                 </sequence>
                 </complexType>
                 </element>
                 <element name='getTokenResponse'>
                 <complexType>
                 <sequence>
                 <element maxOccurs='1' minOccurs='0' name='getTokenResult' type='string'/>
                 </sequence>
                 </complexType>
                 </element>
                </schema>
                
                
                ClientEndpointMetaData:
                 type=JAXWS
                 qname={http://webservices.maplink2.com.br}AuthenticationSoap
                 address=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx
                 binding=http://www.w3.org/2003/05/soap/bindings/HTTP/
                 seiName=ws.maplink.authentication.AuthenticationSoap
                 configFile=META-INF/standard-jaxws-client-config.xml
                 configName=Standard Client
                 authMethod=null
                 properties={}
                
                OperationMetaData:
                 qname={http://webservices.maplink2.com.br}getToken
                 javaName=getToken
                 style=document/literal/WRAPPED
                 oneWay=false
                 soapAction=http://webservices.maplink2.com.br/getToken
                ParameterMetaData:
                 xmlName={http://webservices.maplink2.com.br}getToken
                 partName=getToken
                 xmlType={http://webservices.maplink2.com.br}getToken
                 javaType=ws.maplink.authentication.GetToken
                 mode=IN
                 inHeader=false
                 index=0
                 wrappedParameters=[[name = {http://webservices.maplink2.com.br}user, type = java.lang.String, typeArgs = null, variable = user, index = 0], [name = {http://webservices.maplink2.com.br}pwd, type = java.lang.String, typeArgs = null, variable = pwd, index = 1]]
                ReturnMetaData:
                 xmlName={http://webservices.maplink2.com.br}getTokenResponse
                 partName=getTokenResponse
                 xmlType={http://webservices.maplink2.com.br}getTokenResponse
                 javaType=ws.maplink.authentication.GetTokenResponse
                 mode=OUT
                 inHeader=false
                 index=-1
                 wrappedParameters=[[name = {http://webservices.maplink2.com.br}getTokenResult, type = java.lang.String, typeArgs = null, variable = getTokenResult, index = -1]]
                ClientEndpointMetaData:
                 type=JAXWS
                 qname={http://webservices.maplink2.com.br}AuthenticationSoap12
                 address=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx
                 binding=http://www.w3.org/2003/05/soap/bindings/HTTP/
                 seiName=null
                 configFile=META-INF/standard-jaxws-client-config.xml
                 configName=Standard Client
                 authMethod=null
                 properties={}
                
                OperationMetaData:
                 qname={http://webservices.maplink2.com.br}getToken
                 javaName={http://webservices.maplink2.com.br}getToken
                 style=document/literal/WRAPPED
                 oneWay=false
                 soapAction=http://webservices.maplink2.com.br/getToken
                16/04/2008 13:21:06 org.jboss.ws.metadata.umdm.EndpointMetaData - Configure SOAPBinding
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerResolverImpl - initHandlerChain: PRE
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerResolverImpl - initHandlerChain: ENDPOINT
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerResolverImpl - initHandlerChain: POST
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerResolverImpl - getHandlerChain: [type=PRE,info=[service={http://webservices.maplink2.com.br}Authentication,port={http://webservices.maplink2.com.br}AuthenticationSoap,binding=http://www.w3.org/2003/05/soap/bindings/HTTP/]]
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerResolverImpl - getHandlerChain: [type=POST,info=[service={http://webservices.maplink2.com.br}Authentication,port={http://webservices.maplink2.com.br}AuthenticationSoap,binding=http://www.w3.org/2003/05/soap/bindings/HTTP/]]
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerResolverImpl - getHandlerChain: [type=ENDPOINT,info=[service={http://webservices.maplink2.com.br}Authentication,port={http://webservices.maplink2.com.br}AuthenticationSoap,binding=http://www.w3.org/2003/05/soap/bindings/HTTP/]]
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.binding.BindingImpl - setHandlerChain: []
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl - No port configuration for: {http://webservices.maplink2.com.br}AuthenticationSoap
                16/04/2008 13:21:06 org.jboss.ws.core.soap.MessageContextAssociation - pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@bc5596 (Thread main)
                16/04/2008 13:21:06 org.jboss.ws.core.jaxrpc.ParameterWrapping - wrapRequestParameters: ws.maplink.authentication.GetToken
                16/04/2008 13:21:06 org.jboss.ws.core.EndpointInvocation - setRequestParamValue: [name={http://webservices.maplink2.com.br}getToken,value=ws.maplink.authentication.GetToken]
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.binding.SOAP12BindingJAXWS - bindRequestMessage: {http://webservices.maplink2.com.br}getToken
                16/04/2008 13:21:06 org.jboss.ws.core.EndpointInvocation - getRequestParamValue: {http://webservices.maplink2.com.br}getToken
                16/04/2008 13:21:06 org.jboss.ws.core.EndpointInvocation - transformPayloadValue: ws.maplink.authentication.GetToken -> ws.maplink.authentication.GetToken
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerChainExecutor - Create a handler executor: []
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerChainExecutor - Create a handler executor: []
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.handler.HandlerChainExecutor - Create a handler executor: []
                16/04/2008 13:21:06 org.jboss.ws.core.client.HTTPRemotingConnection - Get locator for: [addr=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx,props={javax.xml.ws.service.endpoint.address=http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx}]
                16/04/2008 13:21:06 org.jboss.remoting.MicroRemoteClientInvoker - org.jboss.remoting.transport.http.HTTPClientInvoker@6833f2 connecting
                16/04/2008 13:21:06 org.jboss.remoting.MicroRemoteClientInvoker - org.jboss.remoting.transport.http.HTTPClientInvoker@6833f2 connected
                16/04/2008 13:21:06 org.jboss.ws.core.client.HTTPRemotingConnection - Remoting metadata: {HEADER={SOAPAction="http://webservices.maplink2.com.br/getToken", Content-Type=application/soap+xml; charset=UTF-8}, NoThrowOnError=true}
                16/04/2008 13:21:06 org.jboss.remoting.transport.http.HTTPClientInvoker - Setting request header with SOAPAction : "http://webservices.maplink2.com.br/getToken"
                16/04/2008 13:21:06 org.jboss.remoting.transport.http.HTTPClientInvoker - Setting request header with Content-Type : application/soap+xml; charset=UTF-8
                16/04/2008 13:21:06 org.jboss.ws.core.soap.SOAPContentElement - -----------------------------------
                16/04/2008 13:21:06 org.jboss.ws.core.soap.SOAPContentElement - Transitioning from OBJECT_VALID to XML_VALID
                16/04/2008 13:21:06 org.jboss.ws.core.soap.ObjectContent - getXMLFragment from Object [xmlType={http://webservices.maplink2.com.br}getToken,javaType=class ws.maplink.authentication.GetToken]
                16/04/2008 13:21:06 org.jboss.ws.core.jaxws.JAXBSerializer - serialize: [xmlName={http://webservices.maplink2.com.br}getToken,xmlType={http://webservices.maplink2.com.br}getToken]
                16/04/2008 13:21:08 org.jboss.ws.core.jaxws.JAXBSerializer - serialized: <getToken xmlns="http://webservices.maplink2.com.br"><user>user</user><pwd>password</pwd></getToken>
                16/04/2008 13:21:08 org.jboss.ws.core.soap.ObjectContent - xmlFragment: [source=<getToken xmlns="http://webservices.maplink2.com.br"><user>user</user><pwd>password</pwd></getToken>]
                16/04/2008 13:21:08 org.jboss.ws.core.soap.SOAPContentElement - -----------------------------------
                16/04/2008 13:21:08 org.jboss.remoting.transport.http.HTTPClientInvoker - Error invoking http client invoker.
                org.jboss.ws.WSException: Invalid HTTP server response [501] - Not Implemented
                 at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:77)
                 at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:473)
                 at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:305)
                 at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
                 at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
                 at org.jboss.remoting.Client.invoke(Client.java:1634)
                 at org.jboss.remoting.Client.invoke(Client.java:548)
                 at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:233)
                 at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:73)
                 at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:339)
                 at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
                 at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:172)
                 at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:152)
                 at $Proxy15.getToken(Unknown Source)
                 at teste.Teste.getXY(Teste.java:26)
                 at teste.Teste.main(Teste.java:73)
                16/04/2008 13:21:08 org.jboss.ws.core.jaxws.handler.MessageContextJAXWS - Begin response processing
                16/04/2008 13:21:08 org.jboss.ws.core.soap.MessageContextAssociation - popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@bc5596 (Thread main)
                16/04/2008 13:21:08 org.jboss.ws.core.soap.MessageContextAssociation - pushMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@8f2ca6 (Thread main)
                16/04/2008 13:21:08 org.jboss.ws.core.jaxws.handler.HandlerChainExecutor - close
                16/04/2008 13:21:08 org.jboss.ws.core.jaxws.handler.HandlerChainExecutor - close
                16/04/2008 13:21:08 org.jboss.ws.core.jaxws.handler.HandlerChainExecutor - close
                16/04/2008 13:21:08 org.jboss.ws.core.soap.MessageContextAssociation - popMessageContext: org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS@8f2ca6 (Thread main)


                Can you see the problem?
                Thanks


                • 5. Re: Problem consuming .net webservice with jbossws-3.0.1-nat
                  ropalka

                  This is our code:

                  public class SOAPMessageUnMarshallerHTTP implements UnMarshaller
                  {
                   private static List validResponseCodes = new ArrayList();
                   static
                   {
                   validResponseCodes.add(HttpServletResponse.SC_OK); // 200
                   validResponseCodes.add(HttpServletResponse.SC_ACCEPTED);
                   validResponseCodes.add(HttpServletResponse.SC_NO_CONTENT);
                   validResponseCodes.add(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                   }
                  
                   public Object read(InputStream inputStream, Map metadata)
                   throws IOException, ClassNotFoundException
                   {
                   ...
                   if (validResponseCodes.contains(resCode) == false)
                   throw new WSException("Invalid HTTP server response [" + resCode + "] - " + resMessage);
                   ...
                  }


                  That means we are able to process correctly the following HTTP codes:
                  200, 202, 204 and 500

                  Your response contains 501 HTTP code thus you are receiving the above exception :(
                  Anyway could you post me the response message body? I mean the one that contains 501 HTTP code.

                  • 6. Re: Problem consuming .net webservice with jbossws-3.0.1-nat
                    ropalka

                     

                    "richard.opalka@jboss.com" wrote:

                    Anyway could you post me the response message body? I mean the one that contains 501 HTTP code.


                    I'd like to see if it's correct SOAP fault message or not.

                    • 7. Re: Problem consuming .net webservice with jbossws-3.0.1-nat

                      With wireshark I got:

                      GET /webservices/v3/Authentication/Authentication.asmx?WSDL HTTP/1.1
                      
                      User-Agent: Java/1.5.0_06
                      
                      Host: webservices.maplink2.com.br
                      
                      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
                      
                      Connection: keep-alive
                      
                      Content-type: application/x-www-form-urlencoded
                      
                      
                      
                      HTTP/1.0 200 OK
                      
                      Date: Wed, 16 Apr 2008 17:08:56 GMT
                      
                      Server: Microsoft-IIS/6.0
                      
                      X-Powered-By: ASP.NET
                      
                      X-AspNet-Version: 2.0.50727
                      
                      Cache-Control: private, max-age=0
                      
                      Content-Type: text/xml; charset=utf-8
                      
                      Content-Length: 3399
                      
                      X-Cache: MISS from fw0-sp.buscape-local.com.br
                      
                      Via: 1.0 fw0-sp.buscape-local.com.br:3128 (squid/2.6.STABLE16)
                      
                      Connection: keep-alive
                      
                      
                      
                      <?xml version="1.0" encoding="utf-8"?>
                      
                      <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://webservices.maplink2.com.br" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://webservices.maplink2.com.br" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
                      
                       <wsdl:types>
                      
                       <s:schema elementFormDefault="qualified" targetNamespace="http://webservices.maplink2.com.br">
                      
                       <s:element name="getToken">
                      
                       <s:complexType>
                      
                       <s:sequence>
                      
                       <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
                      
                       <s:element minOccurs="0" maxOccurs="1" name="pwd" type="s:string" />
                      
                       </s:sequence>
                      
                       </s:complexType>
                      
                       </s:element>
                      
                       <s:element name="getTokenResponse">
                      
                       <s:complexType>
                      
                       <s:sequence>
                      
                       <s:element minOccurs="0" maxOccurs="1" name="getTokenResult" type="s:string" />
                      
                       </s:sequence>
                      
                       </s:complexType>
                      
                       </s:element>
                      
                       </s:schema>
                      
                       </wsdl:types>
                      
                       <wsdl:message name="getTokenSoapIn">
                      
                       <wsdl:part name="parameters" element="tns:getToken" />
                      
                       </wsdl:message>
                      
                       <wsdl:message name="getTokenSoapOut">
                      
                       <wsdl:part name="parameters" element="tns:getTokenResponse" />
                      
                       </wsdl:message>
                      
                       <wsdl:portType name="AuthenticationSoap">
                      
                       <wsdl:operation name="getToken">
                      
                       <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Cria token para autentica....o do usu..rio</wsdl:documentation>
                      
                       <wsdl:input message="tns:getTokenSoapIn" />
                      
                       <wsdl:output message="tns:getTokenSoapOut" />
                      
                       </wsdl:operation>
                      
                       </wsdl:portType>
                      
                       <wsdl:binding name="AuthenticationSoap" type="tns:AuthenticationSoap">
                      
                       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
                      
                       <wsdl:operation name="getToken">
                      
                       <soap:operation soapAction="http://webservices.maplink2.com.br/getToken" style="document" />
                      
                       <wsdl:input>
                      
                       <soap:body use="literal" />
                      
                       </wsdl:input>
                      
                       <wsdl:output>
                      
                       <soap:body use="literal" />
                      
                       </wsdl:output>
                      
                       </wsdl:operation>
                      
                       </wsdl:binding>
                      
                       <wsdl:binding name="AuthenticationSoap12" type="tns:AuthenticationSoap">
                      
                       <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
                      
                       <wsdl:operation name="getToken">
                      
                       <soap12:operation soapAction="http://webservices.maplink2.com.br/getToken" style="document" />
                      
                       <wsdl:input>
                      
                       <soap12:body use="literal" />
                      
                       </wsdl:input>
                      
                       <wsdl:output>
                      
                       <soap12:body use="literal" />
                      
                       </wsdl:output>
                      
                       </wsdl:operation>
                      
                       </wsdl:binding>
                      
                       <wsdl:service name="Authentication">
                      
                       <wsdl:port name="AuthenticationSoap" binding="tns:AuthenticationSoap">
                      
                       <soap:address location="http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx" />
                      
                       </wsdl:port>
                      
                       <wsdl:port name="AuthenticationSoap12" binding="tns:AuthenticationSoap12">
                      
                       <soap12:address location="http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx" />
                      
                       </wsdl:port>
                      
                       </wsdl:service>
                      
                      </wsdl:definitions>GET /webservices/v3/Authentication/Authentication.asmx?WSDL HTTP/1.1
                      
                      User-Agent: Java/1.5.0_06
                      
                      Host: webservices.maplink2.com.br
                      
                      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
                      
                      Connection: keep-alive
                      
                      Content-type: application/x-www-form-urlencoded
                      
                      
                      
                      HTTP/1.0 200 OK
                      
                      Date: Wed, 16 Apr 2008 17:08:56 GMT
                      
                      Server: Microsoft-IIS/6.0
                      
                      X-Powered-By: ASP.NET
                      
                      X-AspNet-Version: 2.0.50727
                      
                      Cache-Control: private, max-age=0
                      
                      Content-Type: text/xml; charset=utf-8
                      
                      Content-Length: 3399
                      
                      X-Cache: MISS from fw0-sp.buscape-local.com.br
                      
                      Via: 1.0 fw0-sp.buscape-local.com.br:3128 (squid/2.6.STABLE16)
                      
                      Connection: keep-alive
                      
                      
                      
                      <?xml version="1.0" encoding="utf-8"?>
                      
                      <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://webservices.maplink2.com.br" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://webservices.maplink2.com.br" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
                      
                       <wsdl:types>
                      
                       <s:schema elementFormDefault="qualified" targetNamespace="http://webservices.maplink2.com.br">
                      
                       <s:element name="getToken">
                      
                       <s:complexType>
                      
                       <s:sequence>
                      
                       <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />
                      
                       <s:element minOccurs="0" maxOccurs="1" name="pwd" type="s:string" />
                      
                       </s:sequence>
                      
                       </s:complexType>
                      
                       </s:element>
                      
                       <s:element name="getTokenResponse">
                      
                       <s:complexType>
                      
                       <s:sequence>
                      
                       <s:element minOccurs="0" maxOccurs="1" name="getTokenResult" type="s:string" />
                      
                       </s:sequence>
                      
                       </s:complexType>
                      
                       </s:element>
                      
                       </s:schema>
                      
                       </wsdl:types>
                      
                       <wsdl:message name="getTokenSoapIn">
                      
                       <wsdl:part name="parameters" element="tns:getToken" />
                      
                       </wsdl:message>
                      
                       <wsdl:message name="getTokenSoapOut">
                      
                       <wsdl:part name="parameters" element="tns:getTokenResponse" />
                      
                       </wsdl:message>
                      
                       <wsdl:portType name="AuthenticationSoap">
                      
                       <wsdl:operation name="getToken">
                      
                       <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Cria token para autentica....o do usu..rio</wsdl:documentation>
                      
                       <wsdl:input message="tns:getTokenSoapIn" />
                      
                       <wsdl:output message="tns:getTokenSoapOut" />
                      
                       </wsdl:operation>
                      
                       </wsdl:portType>
                      
                       <wsdl:binding name="AuthenticationSoap" type="tns:AuthenticationSoap">
                      
                       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
                      
                       <wsdl:operation name="getToken">
                      
                       <soap:operation soapAction="http://webservices.maplink2.com.br/getToken" style="document" />
                      
                       <wsdl:input>
                      
                       <soap:body use="literal" />
                      
                       </wsdl:input>
                      
                       <wsdl:output>
                      
                       <soap:body use="literal" />
                      
                       </wsdl:output>
                      
                       </wsdl:operation>
                      
                       </wsdl:binding>
                      
                       <wsdl:binding name="AuthenticationSoap12" type="tns:AuthenticationSoap">
                      
                       <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
                      
                       <wsdl:operation name="getToken">
                      
                       <soap12:operation soapAction="http://webservices.maplink2.com.br/getToken" style="document" />
                      
                       <wsdl:input>
                      
                       <soap12:body use="literal" />
                      
                       </wsdl:input>
                      
                       <wsdl:output>
                      
                       <soap12:body use="literal" />
                      
                       </wsdl:output>
                      
                       </wsdl:operation>
                      
                       </wsdl:binding>
                      
                       <wsdl:service name="Authentication">
                      
                       <wsdl:port name="AuthenticationSoap" binding="tns:AuthenticationSoap">
                      
                       <soap:address location="http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx" />
                      
                       </wsdl:port>
                      
                       <wsdl:port name="AuthenticationSoap12" binding="tns:AuthenticationSoap12">
                      
                       <soap12:address location="http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx" />
                      
                       </wsdl:port>
                      
                       </wsdl:service>
                      
                      </wsdl:definitions>POST /webservices/v3/Authentication/Authentication.asmx HTTP/1.1
                      
                      SOAPAction: "http://webservices.maplink2.com.br/getToken"
                      
                      Content-Type: application/soap+xml; charset=UTF-8
                      
                      JBoss-Remoting-Version: 22
                      
                      User-Agent: JBossRemoting - 2.2.2.SP1 (Bluto)
                      
                      Host: webservices.maplink2.com.br
                      
                      Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
                      
                      Connection: keep-alive
                      
                      Transfer-Encoding: chunked
                      
                      
                      
                      HTTP/1.0 501 Not Implemented
                      
                      Server: squid/2.6.STABLE16
                      
                      Date: Thu, 17 Apr 2008 17:02:56 GMT
                      
                      Content-Type: text/html
                      
                      Content-Length: 1185
                      
                      Expires: Thu, 17 Apr 2008 17:02:56 GMT
                      
                      X-Squid-Error: ERR_UNSUP_REQ 0
                      
                      X-Cache: MISS from fw0-sp.buscape-local.com.br
                      
                      Via: 1.0 fw0-sp.buscape-local.com.br:3128 (squid/2.6.STABLE16)
                      
                      Connection: close
                      
                      
                      
                      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                      <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
                      <TITLE>ERROR: The requested URL could not be retrieved</TITLE>
                      <STYLE type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}PRE{font-family:sans-serif}--></STYLE>
                      </HEAD><BODY>
                      <H1>ERROR</H1>
                      <H2>The requested URL could not be retrieved</H2>
                      <HR noshade size="1px">
                      <P>
                      While trying to retrieve the URL:
                      <A HREF="http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx">http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx</A>
                      <P>
                      The following error was encountered:
                      <UL>
                      <LI>
                      <STRONG>
                      Unsupported Request Method and Protocol
                      </STRONG>
                      </UL>
                      
                      <P>
                      Squid does not support all request methods for all access protocols.
                      For example, you can not POST a Gopher request.
                      <P>Your cache administrator is <A HREF="mailto:webmaster">webmaster</A>.
                      
                      <BR clear="all">
                      <HR noshade size="1px">
                      <ADDRESS>
                      Generated Thu, 17 Apr 2008 17:02:56 GMT by fw0-sp.buscape-local.com.br (squid/2.6.STABLE16)
                      </ADDRESS>
                      </BODY></HTML>
                      e3
                      
                      <env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'><env:Header></env:Header><env:Body><getToken xmlns="http://webservices.maplink2.com.br"><user>user</user><pwd>password</pwd></getToken></env:Body></env:Envelope>
                      
                      0






                      • 8. Re: Problem consuming .net webservice with jbossws-3.0.1-nat

                        I executed my code with jbossws-2.0.0.GA and Jbossws-3.0.1-native-2.0.4.GA.

                        The POST with jbossws-2.0.0.GA (successful)

                        POST /webservices/v3/Authentication/Authentication.asmx?datatype=JBossWSMessage HTTP/1.1
                        
                        SOAPAction: "http://webservices.maplink2.com.br/getToken"
                        
                        Content-Type: text/xml; charset=UTF-8
                        
                        JBoss-Remoting-Version: 22
                        
                        User-Agent: JBossRemoting - 2.2.2.SP4 (Bluto)
                        
                        Host: webservices.maplink2.com.br
                        
                        Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
                        
                        Connection: keep-alive
                        
                        Content-Length: 230
                        
                        
                        
                        <env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'><env:Header></env:Header><env:Body><getToken xmlns="http://webservices.maplink2.com.br"><user>user</user><pwd>password</pwd></getToken></env:Body></env:Envelope>


                        The POST with Jbossws-3.0.1-native-2.0.4.GA (with problem)

                        POST /webservices/v3/Authentication/Authentication.asmx HTTP/1.1
                        
                        SOAPAction: "http://webservices.maplink2.com.br/getToken"
                        
                        Content-Type: application/soap+xml; charset=UTF-8
                        
                        JBoss-Remoting-Version: 22
                        
                        User-Agent: JBossRemoting - 2.2.2.SP4 (Bluto)
                        
                        Host: webservices.maplink2.com.br
                        
                        Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
                        
                        Connection: keep-alive
                        
                        Transfer-Encoding: chunked
                        
                        
                        
                        e6
                        
                        <env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'><env:Header></env:Header><env:Body><getToken xmlns="http://webservices.maplink2.com.br"><user>user</user><pwd>password</pwd></getToken></env:Body></env:Envelope>
                        
                        0


                        Please, read my last post too.
                        Thanks

                        • 9. Re: Problem consuming .net webservice with jbossws-3.0.1-nat
                          ropalka

                          I'm not able to reproduce your problem.

                          I generated JAX-WS artifacts from WSDL using the following command:

                          cd $JBOSS_HOME/bin
                          
                          ./wsconsume.sh --keep --extension --source=src http://webservices.maplink2.com.br/webservices/v3/Authentication/Authentication.asmx?WSDL
                          


                          and I created the following test:

                          package br.com.maplink2.webservices;
                          
                          import org.jboss.wsf.test.JBossWSTest;
                          
                          public final class AuthenticationTestCase extends JBossWSTest
                          {
                           public void testSOAP11()
                           {
                           Authentication auth = new Authentication();
                           AuthenticationSoap as11 = auth.getAuthenticationSoap();
                           System.out.println(as11.getToken("user", "password"));
                           }
                          
                           public void testSOAP12()
                           {
                           Authentication auth = new Authentication();
                           AuthenticationSoap as12 = auth.getAuthenticationSoap12();
                           System.out.println(as12.getToken("user", "password"));
                           }
                          }
                          


                          However I'm always getting HTTP 500 error message. I'm not able to reproduce your HTTP 501 error issue :(

                          • 10. Re: Problem consuming .net webservice with jbossws-3.0.1-nat
                            ropalka

                            I tried also low level approach based on sockets:

                            package org.jboss.test.ws.remoting_issue;
                            
                            import java.io.InputStream;
                            import java.io.OutputStream;
                            import java.net.Socket;
                            
                            public final class Test {
                            
                             private static final String CRNL = "\r\n";
                             private static final String envelope = "<env:Envelope xmlns:env='http://www.w3.org/2003/05/soap-envelope'><env:Header></env:Header><env:Body><getToken xmlns='http://webservices.maplink2.com.br'><user>user</user><pwd>password</pwd></getToken></env:Body></env:Envelope>";
                             private static final String msg =
                             "POST /webservices/v3/Authentication/Authentication.asmx HTTP/1.1" + CRNL +
                             "SOAPAction: \"http://webservices.maplink2.com.br/getToken\"" + CRNL +
                             "Content-Type: application/soap+xml; charset=UTF-8" + CRNL +
                             "JBoss-Remoting-Version: 22" + CRNL +
                             "User-Agent: JBossRemoting - 2.2.2.SP4 (Bluto)" + CRNL +
                             "Host: webservices.maplink2.com.br" + CRNL +
                             "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" + CRNL +
                             "Connection: keep-alive" + CRNL +
                             "Transfer-Encoding: chunked" + CRNL +
                             "" + CRNL +
                             Integer.toHexString(envelope.length()) + CRNL +
                             envelope + CRNL + "0" + CRNL;
                            
                             public static void main(String[] args) throws Exception
                             {
                             System.out.println("Sending message" + CRNL + CRNL + msg + CRNL);
                             System.out.println("Receiving message" + CRNL);
                             Socket socket = new Socket("webservices.maplink2.com.br", 80);
                             OutputStream os = socket.getOutputStream();
                             os.write(msg.getBytes());
                             os.flush();
                             InputStream is = socket.getInputStream();
                             copy(is, System.out);
                             }
                            
                             private static void copy(InputStream is, OutputStream os) throws Exception
                             {
                             byte[] buffer = new byte[128];
                             int count = -1;
                             while ((count = is.read(buffer)) != -1)
                             {
                             os.write(buffer, 0, count);
                             }
                             os.flush();
                             }
                            
                            }
                            


                            but still the same result. I'm always getting HTTP 500 error code, not 501 :(

                            • 11. Re: Problem consuming .net webservice with jbossws-3.0.1-nat

                              Very stranger Richard,

                              I got here error 501.
                              But, try generate the stub client using jbossws-2.0.0.GA, should work.
                              Try send the POST with the version of jbossws-2.0.0.GA.
                              Thanks

                              • 12. Re: Problem consuming .net webservice with jbossws-3.0.1-nat

                                Completing the my last post, I am using a Windows machine and you a Unix machine. The default file-encoding are different. Because of this you can got error 500.
                                Please read my last post too.
                                Thanks

                                • 13. Re: Problem consuming .net webservice with jbossws-3.0.1-nat
                                  ropalka

                                   

                                  "claudio_br" wrote:
                                  Completing the my last post, I am using a Windows machine and you a Unix machine. The default file-encoding are different. Because of this you can got error 500.
                                  Please read my last post too.
                                  Thanks

                                  I don't think the problem is related to unix vs. windows.
                                  Maybe it's related to the machine default encoding.
                                  Please, try to specify -Dfile.encoding=utf-8 on client side when executing the client via java command

                                  • 14. Re: Problem consuming .net webservice with jbossws-3.0.1-nat

                                    Hi Richard,

                                    I am ready using -Dfile.encoding=utf-8.
                                    In your test code you must to use:

                                    os.write(msg.getBytes("UTF-8"))
                                    



                                    You are using:

                                    os.write(msg.getBytes())


                                    Please, try using jbossws 2.0.0.GA to same wsdl, should work.
                                    Try use POST of jbossws 2.0.0.GA in your test code.

                                    Thanks


                                    1 2 Previous Next