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 shantanu chawla <sh...@gmail.com> on 2007/04/13 19:38:09 UTC

Axis2. 1.1.1 cannot generate code from wsdl generated by WCF web service

I developed a WCF web service and now I am trying to create a client
to consume WCF service in java using axis2 1.1.1 version. I am using
Axis2 code generator version 1.2.1 compatible with axis2 version 1.1.1
for eclipse.

When I am trying to generate client code I am gettting the error the
following error

An error occured while completing proecess -
java.lang.InterruptedException:
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.langRuntimeException:
WSHttpBinding_IMyService_MyOperation1_Input_policy can't be resolved

The wsdl I am using is

<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions name="MyService"
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: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="WSHttpBinding_IMyService_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SymmetricBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:ProtectionToken>
<wsp:Policy>
<sp:SecureConversationToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
  <sp:RequireDerivedKeys />
<sp:BootstrapPolicy>
<wsp:Policy>
<sp:SignedParts>
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts>
  <sp:Body />
  </sp:EncryptedParts>
<sp:SymmetricBinding>
<wsp:Policy>
<sp:ProtectionToken>
<wsp:Policy>
<sp:SpnegoContextToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
  <sp:RequireDerivedKeys />
  </wsp:Policy>
  </sp:SpnegoContextToken>
  </wsp:Policy>
  </sp:ProtectionToken>
<sp:AlgorithmSuite>
<wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
<sp:Wss11>
<wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
<sp:Trust10>
<wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  </wsp:Policy>
  </sp:BootstrapPolicy>
  </wsp:Policy>
  </sp:SecureConversationToken>
  </wsp:Policy>
  </sp:ProtectionToken>
<sp:AlgorithmSuite>
<wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
<sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
<sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  <wsaw:UsingAddressing />
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation1_Input_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation1_output_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation2_Input_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation2_output_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd0"
namespace="http://tempuri.org/" />
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd1"
namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd2"
namespace="http://schemas.datacontract.org/2004/07/" />
  </xsd:schema>
  </wsdl:types>
<wsdl:message name="IMyService_MyOperation1_InputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation1" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation1_OutputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation1Response" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation2_InputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation2" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation2_OutputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation2Response" />
  </wsdl:message>
<wsdl:portType name="IMyService">
<wsdl:operation name="MyOperation1">
  <wsdl:input wsaw:Action="http://tempuri.org/IMyService/MyOperation1"
message="tns:IMyService_MyOperation1_InputMessage" />
  <wsdl:output wsaw:Action="http://tempuri.org/IMyService/MyOperation1Response"
message="tns:IMyService_MyOperation1_OutputMessage" />
  </wsdl:operation>
<wsdl:operation name="MyOperation2">
  <wsdl:input wsaw:Action="http://tempuri.org/IMyService/MyOperation2"
message="tns:IMyService_MyOperation2_InputMessage" />
  <wsdl:output wsaw:Action="http://tempuri.org/IMyService/MyOperation2Response"
message="tns:IMyService_MyOperation2_OutputMessage" />
  </wsdl:operation>
  </wsdl:portType>
<wsdl:binding name="WSHttpBinding_IMyService" type="tns:IMyService">
  <wsp:PolicyReference URI="#WSHttpBinding_IMyService_policy" />
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="MyOperation1">
  <soap12:operation
soapAction="http://tempuri.org/IMyService/MyOperation1"
style="document" />
<wsdl:input>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation1_Input_policy" />
  <soap12:body use="literal" />
  </wsdl:input>
<wsdl:output>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation1_output_policy" />
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
<wsdl:operation name="MyOperation2">
  <soap12:operation
soapAction="http://tempuri.org/IMyService/MyOperation2"
style="document" />
<wsdl:input>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation2_Input_policy" />
  <soap12:body use="literal" />
  </wsdl:input>
<wsdl:output>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation2_output_policy" />
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="WSHttpBinding_IMyService"
binding="tns:WSHttpBinding_IMyService">
  <soap12:address
location="http://svr11.lab.interface.local/WCFService/Service.svc" />
<wsa10:EndpointReference>
  <wsa10:Address>http://svr11.lab.interface.local/WCFService/Service.svc</wsa10:Address>
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
  <Spn>host/SVR11.lab.interface.local</Spn>
  </Identity>
  </wsa10:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

I can consume the service in .net.
I am kinda stuck so if any of you guys can help me out would be great .

Thanks

Shantanu
-- 
Graduate Student
Department of Computer Science,
San Diego State University

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Axis2. 1.1.1 cannot generate code from wsdl generated by WCF web service

Posted by shantanu chawla <sh...@gmail.com>.
I developed a WCF web service and now I am trying to create a client
to consume WCF service in java using axis2 1.1.1 version. I am using
Axis2 code generator version 1.2.1 compatible with axis2 version 1.1.1
for eclipse.

When I am trying to generate client code I am gettting the error the
following error

An error occured while completing proecess -
java.lang.InterruptedException:
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.langRuntimeException:
WSHttpBinding_IMyService_MyOperation1_Input_policy can't be resolved

The wsdl I am using is

<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions name="MyService"
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: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="WSHttpBinding_IMyService_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SymmetricBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:ProtectionToken>
<wsp:Policy>
<sp:SecureConversationToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
  <sp:RequireDerivedKeys />
<sp:BootstrapPolicy>
<wsp:Policy>
<sp:SignedParts>
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts>
  <sp:Body />
  </sp:EncryptedParts>
<sp:SymmetricBinding>
<wsp:Policy>
<sp:ProtectionToken>
<wsp:Policy>
<sp:SpnegoContextToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
  <sp:RequireDerivedKeys />
  </wsp:Policy>
  </sp:SpnegoContextToken>
  </wsp:Policy>
  </sp:ProtectionToken>
<sp:AlgorithmSuite>
<wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
<sp:Wss11>
<wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
<sp:Trust10>
<wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  </wsp:Policy>
  </sp:BootstrapPolicy>
  </wsp:Policy>
  </sp:SecureConversationToken>
  </wsp:Policy>
  </sp:ProtectionToken>
<sp:AlgorithmSuite>
<wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
<sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
<sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  <wsaw:UsingAddressing />
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation1_Input_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation1_output_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation2_Input_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation2_output_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd0"
namespace="http://tempuri.org/" />
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd1"
namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd2"
namespace="http://schemas.datacontract.org/2004/07/" />
  </xsd:schema>
  </wsdl:types>
<wsdl:message name="IMyService_MyOperation1_InputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation1" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation1_OutputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation1Response" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation2_InputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation2" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation2_OutputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation2Response" />
  </wsdl:message>
<wsdl:portType name="IMyService">
<wsdl:operation name="MyOperation1">
  <wsdl:input wsaw:Action="http://tempuri.org/IMyService/MyOperation1"
message="tns:IMyService_MyOperation1_InputMessage" />
  <wsdl:output wsaw:Action="http://tempuri.org/IMyService/MyOperation1Response"
message="tns:IMyService_MyOperation1_OutputMessage" />
  </wsdl:operation>
<wsdl:operation name="MyOperation2">
  <wsdl:input wsaw:Action="http://tempuri.org/IMyService/MyOperation2"
message="tns:IMyService_MyOperation2_InputMessage" />
  <wsdl:output wsaw:Action="http://tempuri.org/IMyService/MyOperation2Response"
message="tns:IMyService_MyOperation2_OutputMessage" />
  </wsdl:operation>
  </wsdl:portType>
<wsdl:binding name="WSHttpBinding_IMyService" type="tns:IMyService">
  <wsp:PolicyReference URI="#WSHttpBinding_IMyService_policy" />
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="MyOperation1">
  <soap12:operation
soapAction="http://tempuri.org/IMyService/MyOperation1"
style="document" />
<wsdl:input>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation1_Input_policy" />
  <soap12:body use="literal" />
  </wsdl:input>
<wsdl:output>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation1_output_policy" />
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
<wsdl:operation name="MyOperation2">
  <soap12:operation
soapAction="http://tempuri.org/IMyService/MyOperation2"
style="document" />
<wsdl:input>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation2_Input_policy" />
  <soap12:body use="literal" />
  </wsdl:input>
<wsdl:output>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation2_output_policy" />
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="WSHttpBinding_IMyService"
binding="tns:WSHttpBinding_IMyService">
  <soap12:address
location="http://svr11.lab.interface.local/WCFService/Service.svc" />
<wsa10:EndpointReference>
  <wsa10:Address>http://svr11.lab.interface.local/WCFService/Service.svc</wsa10:Address>
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
  <Spn>host/SVR11.lab.interface.local</Spn>
  </Identity>
  </wsa10:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

I can consume the service in .net.
I am kinda stuck so if any of you guys can help me out would be great .

Thanks

Shantanu

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Axis2. 1.1.1 cannot generate code from wsdl generated by WCF web service

Posted by shantanu chawla <sh...@gmail.com>.
I developed a WCF web service and now I am trying to create a client
to consume WCF service in java using axis2 1.1.1 version. I am using
Axis2 code generator version 1.2.1 compatible with axis2 version 1.1.1
for eclipse.

When I am trying to generate client code I am gettting the error the
following error

An error occured while completing proecess -
java.lang.InterruptedException:
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.langRuntimeException:
WSHttpBinding_IMyService_MyOperation1_Input_policy can't be resolved

The wsdl I am using is

<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions name="MyService"
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: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="WSHttpBinding_IMyService_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SymmetricBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:ProtectionToken>
<wsp:Policy>
<sp:SecureConversationToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
  <sp:RequireDerivedKeys />
<sp:BootstrapPolicy>
<wsp:Policy>
<sp:SignedParts>
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts>
  <sp:Body />
  </sp:EncryptedParts>
<sp:SymmetricBinding>
<wsp:Policy>
<sp:ProtectionToken>
<wsp:Policy>
<sp:SpnegoContextToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
  <sp:RequireDerivedKeys />
  </wsp:Policy>
  </sp:SpnegoContextToken>
  </wsp:Policy>
  </sp:ProtectionToken>
<sp:AlgorithmSuite>
<wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
<sp:Wss11>
<wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
<sp:Trust10>
<wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  </wsp:Policy>
  </sp:BootstrapPolicy>
  </wsp:Policy>
  </sp:SecureConversationToken>
  </wsp:Policy>
  </sp:ProtectionToken>
<sp:AlgorithmSuite>
<wsp:Policy>
  <sp:Basic256 />
  </wsp:Policy>
  </sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
  <sp:Strict />
  </wsp:Policy>
  </sp:Layout>
  <sp:IncludeTimestamp />
  <sp:EncryptSignature />
  <sp:OnlySignEntireHeadersAndBody />
  </wsp:Policy>
  </sp:SymmetricBinding>
<sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
  <sp:MustSupportRefKeyIdentifier />
  <sp:MustSupportRefIssuerSerial />
  <sp:MustSupportRefThumbprint />
  <sp:MustSupportRefEncryptedKey />
  </wsp:Policy>
  </sp:Wss11>
<sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
  <sp:MustSupportIssuedTokens />
  <sp:RequireClientEntropy />
  <sp:RequireServerEntropy />
  </wsp:Policy>
  </sp:Trust10>
  <wsaw:UsingAddressing />
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation1_Input_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation1_output_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation2_Input_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsp:Policy wsu:Id="WSHttpBinding_IMyService_MyOperation2_output_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="MessageID"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="RelatesTo"
Namespace="http://www.w3.org/2005/08/addressing" />
  <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" />
  </sp:SignedParts>
<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
  <sp:Body />
  </sp:EncryptedParts>
  </wsp:All>
  </wsp:ExactlyOne>
  </wsp:Policy>
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd0"
namespace="http://tempuri.org/" />
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd1"
namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xsd:import schemaLocation="http://svr11.lab.interface.local/WCFService/Service.svc?xsd=xsd2"
namespace="http://schemas.datacontract.org/2004/07/" />
  </xsd:schema>
  </wsdl:types>
<wsdl:message name="IMyService_MyOperation1_InputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation1" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation1_OutputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation1Response" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation2_InputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation2" />
  </wsdl:message>
<wsdl:message name="IMyService_MyOperation2_OutputMessage">
  <wsdl:part name="parameters" element="tns:MyOperation2Response" />
  </wsdl:message>
<wsdl:portType name="IMyService">
<wsdl:operation name="MyOperation1">
  <wsdl:input wsaw:Action="http://tempuri.org/IMyService/MyOperation1"
message="tns:IMyService_MyOperation1_InputMessage" />
  <wsdl:output wsaw:Action="http://tempuri.org/IMyService/MyOperation1Response"
message="tns:IMyService_MyOperation1_OutputMessage" />
  </wsdl:operation>
<wsdl:operation name="MyOperation2">
  <wsdl:input wsaw:Action="http://tempuri.org/IMyService/MyOperation2"
message="tns:IMyService_MyOperation2_InputMessage" />
  <wsdl:output wsaw:Action="http://tempuri.org/IMyService/MyOperation2Response"
message="tns:IMyService_MyOperation2_OutputMessage" />
  </wsdl:operation>
  </wsdl:portType>
<wsdl:binding name="WSHttpBinding_IMyService" type="tns:IMyService">
  <wsp:PolicyReference URI="#WSHttpBinding_IMyService_policy" />
  <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="MyOperation1">
  <soap12:operation
soapAction="http://tempuri.org/IMyService/MyOperation1"
style="document" />
<wsdl:input>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation1_Input_policy" />
  <soap12:body use="literal" />
  </wsdl:input>
<wsdl:output>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation1_output_policy" />
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
<wsdl:operation name="MyOperation2">
  <soap12:operation
soapAction="http://tempuri.org/IMyService/MyOperation2"
style="document" />
<wsdl:input>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation2_Input_policy" />
  <soap12:body use="literal" />
  </wsdl:input>
<wsdl:output>
  <wsp:PolicyReference
URI="#WSHttpBinding_IMyService_MyOperation2_output_policy" />
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
<wsdl:service name="MyService">
<wsdl:port name="WSHttpBinding_IMyService"
binding="tns:WSHttpBinding_IMyService">
  <soap12:address
location="http://svr11.lab.interface.local/WCFService/Service.svc" />
<wsa10:EndpointReference>
  <wsa10:Address>http://svr11.lab.interface.local/WCFService/Service.svc</wsa10:Address>
<Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
  <Spn>host/SVR11.lab.interface.local</Spn>
  </Identity>
  </wsa10:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

I can consume the service in .net.
I am kinda stuck so if any of you guys can help me out would be great .

Thanks

Shantanu

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org