0 Replies Latest reply on Aug 10, 2009 3:20 PM by esacchi

    Interaction with HTTPS WCF

      Dear all,

      We are currently using jbossws 3.0.1 native, from a stand alone java application, to dynamically invoke WS.
      It worked without problem with several Web Services stacks and technologies, but right now we are facing
      a problem with a WS implemented in Windows Communication Foundation (WFC - basicHTTPBinding) over
      HTTPS. It's seems that the .NET stack adds a policy section to the WSDL and JBoss library could not handle it.

      WSDL

      <wsdl:definitions name="ServicioCobranza" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
       <wsp:Policy wsu:Id="BasicHttpBinding_IServicioCobranza_policy">
       <wsp:ExactlyOne>
       <wsp:All>
       <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
       <wsp:Policy>
       <sp:TransportToken>
       <wsp:Policy>
       <sp:HttpsToken RequireClientCertificate="false"/>
       </wsp:Policy>
       </sp:TransportToken>
       <sp:AlgorithmSuite>
       <wsp:Policy>
       <sp:Basic256/>
       </wsp:Policy>
       </sp:AlgorithmSuite>
       <sp:Layout>
       <wsp:Policy>
       <sp:Strict/>
       </wsp:Policy>
       </sp:Layout>
       </wsp:Policy>
       </sp:TransportBinding>
       </wsp:All>
       </wsp:ExactlyOne>
       </wsp:Policy>
       <wsdl:types>
       <xsd:schema targetNamespace="http://tempuri.org/Imports">
       <xsd:import schemaLocation="0.xml" namespace="http://tempuri.org/"/>
       <xsd:import schemaLocation="1.xml" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
       <xsd:import schemaLocation="2.xml" namespace="http://schemas.datacontract.org/2004/07/XXX.ServiciosExternos"/>
       <xsd:import schemaLocation="3.xml" namespace="http://schemas.datacontract.org/2004/07/XXX.DTO"/>
       </xsd:schema>
       </wsdl:types>
       <wsdl:message name="IServicioCobranza_ConsultaPorClienteExt_InputMessage">
       <wsdl:part name="parameters" element="tns:ConsultaPorClienteExt"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_ConsultaPorClienteExt_OutputMessage">
       <wsdl:part name="parameters" element="tns:ConsultaPorClienteExtResponse"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_ConsultaPlanesExt_InputMessage">
       <wsdl:part name="parameters" element="tns:ConsultaPlanesExt"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_ConsultaPlanesExt_OutputMessage">
       <wsdl:part name="parameters" element="tns:ConsultaPlanesExtResponse"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_AnulaPagoExt_InputMessage">
       <wsdl:part name="parameters" element="tns:AnulaPagoExt"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_AnulaPagoExt_OutputMessage">
       <wsdl:part name="parameters" element="tns:AnulaPagoExtResponse"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_ReversaTransaccionExt_InputMessage">
       <wsdl:part name="parameters" element="tns:ReversaTransaccionExt"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_ReversaTransaccionExt_OutputMessage">
       <wsdl:part name="parameters" element="tns:ReversaTransaccionExtResponse"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_RealizaPagoExt_InputMessage">
       <wsdl:part name="parameters" element="tns:RealizaPagoExt"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_RealizaPagoExt_OutputMessage">
       <wsdl:part name="parameters" element="tns:RealizaPagoExtResponse"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_ConsultaEstadoPagoExt_InputMessage">
       <wsdl:part name="parameters" element="tns:ConsultaEstadoPagoExt"/>
       </wsdl:message>
       <wsdl:message name="IServicioCobranza_ConsultaEstadoPagoExt_OutputMessage">
       <wsdl:part name="parameters" element="tns:ConsultaEstadoPagoExtResponse"/>
       </wsdl:message>
       <wsdl:portType name="IServicioCobranza">
       <wsdl:operation name="ConsultaPorClienteExt">
       <wsdl:input wsaw:Action="http://tempuri.org/IServicioCobranza/ConsultaPorClienteExt" message="tns:IServicioCobranza_ConsultaPorClienteExt_InputMessage"/>
       <wsdl:output wsaw:Action="http://tempuri.org/IServicioCobranza/ConsultaPorClienteExtResponse" message="tns:IServicioCobranza_ConsultaPorClienteExt_OutputMessage"/>
       </wsdl:operation>
       <wsdl:operation name="ConsultaPlanesExt">
       <wsdl:input wsaw:Action="http://tempuri.org/IServicioCobranza/ConsultaPlanesExt" message="tns:IServicioCobranza_ConsultaPlanesExt_InputMessage"/>
       <wsdl:output wsaw:Action="http://tempuri.org/IServicioCobranza/ConsultaPlanesExtResponse" message="tns:IServicioCobranza_ConsultaPlanesExt_OutputMessage"/>
       </wsdl:operation>
       <wsdl:operation name="AnulaPagoExt">
       <wsdl:input wsaw:Action="http://tempuri.org/IServicioCobranza/AnulaPagoExt" message="tns:IServicioCobranza_AnulaPagoExt_InputMessage"/>
       <wsdl:output wsaw:Action="http://tempuri.org/IServicioCobranza/AnulaPagoExtResponse" message="tns:IServicioCobranza_AnulaPagoExt_OutputMessage"/>
       </wsdl:operation>
       <wsdl:operation name="ReversaTransaccionExt">
       <wsdl:input wsaw:Action="http://tempuri.org/IServicioCobranza/ReversaTransaccionExt" message="tns:IServicioCobranza_ReversaTransaccionExt_InputMessage"/>
       <wsdl:output wsaw:Action="http://tempuri.org/IServicioCobranza/ReversaTransaccionExtResponse" message="tns:IServicioCobranza_ReversaTransaccionExt_OutputMessage"/>
       </wsdl:operation>
       <wsdl:operation name="RealizaPagoExt">
       <wsdl:input wsaw:Action="http://tempuri.org/IServicioCobranza/RealizaPagoExt" message="tns:IServicioCobranza_RealizaPagoExt_InputMessage"/>
       <wsdl:output wsaw:Action="http://tempuri.org/IServicioCobranza/RealizaPagoExtResponse" message="tns:IServicioCobranza_RealizaPagoExt_OutputMessage"/>
       </wsdl:operation>
       <wsdl:operation name="ConsultaEstadoPagoExt">
       <wsdl:input wsaw:Action="http://tempuri.org/IServicioCobranza/ConsultaEstadoPagoExt" message="tns:IServicioCobranza_ConsultaEstadoPagoExt_InputMessage"/>
       <wsdl:output wsaw:Action="http://tempuri.org/IServicioCobranza/ConsultaEstadoPagoExtResponse" message="tns:IServicioCobranza_ConsultaEstadoPagoExt_OutputMessage"/>
       </wsdl:operation>
       </wsdl:portType>
       <wsdl:binding name="BasicHttpBinding_IServicioCobranza" type="tns:IServicioCobranza">
       <wsp:PolicyReference URI="#BasicHttpBinding_IServicioCobranza_policy"/>
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
       <wsdl:operation name="ConsultaPorClienteExt">
       <soap:operation soapAction="http://tempuri.org/IServicioCobranza/ConsultaPorClienteExt" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="ConsultaPlanesExt">
       <soap:operation soapAction="http://tempuri.org/IServicioCobranza/ConsultaPlanesExt" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="AnulaPagoExt">
       <soap:operation soapAction="http://tempuri.org/IServicioCobranza/AnulaPagoExt" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="ReversaTransaccionExt">
       <soap:operation soapAction="http://tempuri.org/IServicioCobranza/ReversaTransaccionExt" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="RealizaPagoExt">
       <soap:operation soapAction="http://tempuri.org/IServicioCobranza/RealizaPagoExt" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       <wsdl:operation name="ConsultaEstadoPagoExt">
       <soap:operation soapAction="http://tempuri.org/IServicioCobranza/ConsultaEstadoPagoExt" style="document"/>
       <wsdl:input>
       <soap:body use="literal"/>
       </wsdl:input>
       <wsdl:output>
       <soap:body use="literal"/>
       </wsdl:output>
       </wsdl:operation>
       </wsdl:binding>
       <wsdl:service name="ServicioCobranza">
       <wsdl:port name="BasicHttpBinding_IServicioCobranza" binding="tns:BasicHttpBinding_IServicioCobranza">
       <soap:address location="https://XXX.XXX.XXX.XXX/XXX.ServiciosExternos/ServicioCobranza.svc"/>
       </wsdl:port>
       </wsdl:service>
      </wsdl:definitions>
      


      Log
      DEBUG [main] (JAXWSClientMetaDataBuilder.java:75) - START buildMetaData: [service={http://tempuri.org/}ServicioCobranza]
      DEBUG [main] (WSDLDefinitionsFactory.java:100) - parse: file:/C:/KS/XXX/Produccion/wsdl.xml
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=file:/C:/KS/XXX/Produccion/2.xml,sysid=file:/C:/KS/XXX/Produccion/2.xml]
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=file:/C:/KS/XXX/Produccion/3.xml,sysid=file:/C:/KS/XXX/Produccion/3.xml]
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=file:/C:/KS/XXX/Produccion/3.xml,sysid=file:/C:/KS/XXX/Produccion/3.xml]
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=file:/C:/KS/XXX/Produccion/0.xml,sysid=file:/C:/KS/XXX/Produccion/0.xml]
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=file:/C:/KS/XXX/Produccion/2.xml,sysid=file:/C:/KS/XXX/Produccion/2.xml]
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=file:/C:/KS/XXX/Produccion/1.xml,sysid=file:/C:/KS/XXX/Produccion/1.xml]
      DEBUG [main] (JavaToXSD.java:174) - Load schema: http://schemas.datacontract.org/2004/07/XXX.ServiciosExternos=file:/C:/KS/XXX/Produccion/2.xml
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=null,sysid=file:/C:/KS/XXX/Produccion/2.xml]
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=http://schemas.datacontract.org/2004/07/XXX.DTO,sysid=3.xml]
      DEBUG [main] (JBossEntityResolver.java:272) - Cannot resolve [publicID=http://schemas.datacontract.org/2004/07/XXX.DTO,systemID=3.xml]
      DEBUG [main] (JBossWSEntityResolver.java:69) - Cannot resolve entity: [pub=http://schemas.datacontract.org/2004/07/XXX.DTO,sysid=3.xml]
      DEBUG [main] (JavaToXSD.java:174) - Load schema: http://schemas.datacontract.org/2004/07/XXX.DTO=file:/C:/KS/XXX/Produccion/3.xml
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=null,sysid=file:/C:/KS/XXX/Produccion/3.xml]
      DEBUG [main] (JavaToXSD.java:174) - Load schema: http://tempuri.org/=file:/C:/KS/XXX/Produccion/0.xml
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=null,sysid=file:/C:/KS/XXX/Produccion/0.xml]
      DEBUG [main] (JavaToXSD.java:174) - Load schema: http://schemas.microsoft.com/2003/10/Serialization/=file:/C:/KS/XXX/Produccion/1.xml
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=null,sysid=file:/C:/KS/XXX/Produccion/1.xml]
      DEBUG [main] (JavaToXSD.java:174) - Load schema: http://tempuri.org/Imports=file:/C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/JBossWS_tempuri.org_Imports45771.xsd
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=null,sysid=file:/C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/1/JBossWS_tempuri.org_Imports45771.xsd]
      DEBUG [main] (JBossWSEntityResolver.java:62) - resolveEntity: [pub=http://schemas.xmlsoap.org/soap/encoding/,sysid=null]
      DEBUG [main] (Policy.java:131) - Enter: Policy::normalize
      DEBUG [main] (XorCompositeAssertion.java:48) - Enter: XorCompositeAssertion::normalize
      DEBUG [main] (AndCompositeAssertion.java:396) - Enter: AndCompositeAssertion::normalize
      DEBUG [main] (PrimitiveAssertion.java:216) - Enter: PrimitveAssertion:normalize
      DEBUG [main] (Policy.java:131) - Enter: Policy::normalize
      DEBUG [main] (PrimitiveAssertion.java:216) - Enter: PrimitveAssertion:normalize
      DEBUG [main] (Policy.java:131) - Enter: Policy::normalize
      DEBUG [main] (PrimitiveAssertion.java:216) - Enter: PrimitveAssertion:normalize
      DEBUG [main] (PrimitiveAssertion.java:216) - Enter: PrimitveAssertion:normalize
      DEBUG [main] (Policy.java:131) - Enter: Policy::normalize
      DEBUG [main] (PrimitiveAssertion.java:216) - Enter: PrimitveAssertion:normalize
      DEBUG [main] (PrimitiveAssertion.java:216) - Enter: PrimitveAssertion:normalize
      DEBUG [main] (Policy.java:131) - Enter: Policy::normalize
      DEBUG [main] (PrimitiveAssertion.java:216) - Enter: PrimitveAssertion:normalize
      DEBUG [main] (PolicyDeployer.java:249) - Unknown namespace:http://schemas.xmlsoap.org/ws/2005/07/securitypolicy...Assertion not supported
      ERROR [main] (PolicyDeployer.java:173) - Unsupported assertion!
      DEBUG [main] (PolicyMetaDataBuilder.java:314) - Policy Not supported:#BasicHttpBinding_IServicioCobranza_policy
      org.jboss.ws.WSException: Policy not supported! #BasicHttpBinding_IServicioCobranza_policy
       at org.jboss.ws.WSException.rethrow(WSException.java:60)
       at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicyClientSide(PolicyMetaDataBuilder.java:316)
       at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicy(PolicyMetaDataBuilder.java:274)
       at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.processPolicies(PolicyMetaDataBuilder.java:233)
       at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.processPolicyExtensions(PolicyMetaDataBuilder.java:190)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:92)
       at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:136)
       at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
       at javax.xml.ws.Service.<init>(Service.java:82)
       at javax.xml.ws.Service.create(Service.java:334)
       at Test.llamadoDinamicoXXX(Test.java:507)
       at Test.testWSWeb(Test.java:49)
       at Test.main(Test.java:36)
      Caused by: org.jboss.ws.extensions.policy.deployer.exceptions.UnsupportedPolicy
       at org.jboss.ws.extensions.policy.deployer.PolicyDeployer.deployClientSide(PolicyDeployer.java:174)
       at org.jboss.ws.extensions.policy.metadata.PolicyMetaDataBuilder.deployPolicyClientSide(PolicyMetaDataBuilder.java:307)
       ... 11 more

      Any help would be appreciated.

      regards