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/16 23:14:36 UTC

Axis fault accessing WCF web service with WsHttpBinding

I am creating a client in java using axis2 1.1.1 to test
interoperability with WCF web services. My WCF web service is based on
wsHttpBinding. When I am trying to call its methods I am getting this
axis fault error.

org.apache.axis2.AxisFault: The SOAP action specified on the message,
'', does not match the HTTP SOAP Action,
'http://tempuri.org/IMyService/MyOperation1'.

My wsdl 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>
  <wsaw:UsingAddressing />
  </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>
  <soap12:body use="literal" />
  </wsdl:input>
<wsdl:output>
  <soap12:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
<wsdl:operation name="MyOperation2">
  <soap12:operation
soapAction="http://tempuri.org/IMyService/MyOperation2"
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="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>
  </wsa10:EndpointReference>
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

and the java code of the stub generated by axis is

   public  void startMyOperation1(

                 org.tempuri.MyServiceStub.MyOperation1 param4,

                  final org.tempuri.MyServiceCallbackHandler callback)

                throws java.rmi.RemoteException{

              org.apache.axis2.client.OperationClient _operationClient
= _serviceClient.createClient(_operations[0].getName());
             _operationClient.getOptions().setAction("http://tempuri.org/IMyService/MyOperation1");
     _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);



              // create SOAP envelope with that payload
              org.apache.axiom.soap.SOAPEnvelope env=null;

                                    //Style is Doc.


                                                    env =
toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
                                                    param4,

optimizeContent(new javax.xml.namespace.QName("",
                                                    "MyOperation1")));

        //adding SOAP headers
         _serviceClient.addHeadersToEnvelope(env);
        // create message context with that soap envelope
        org.apache.axis2.context.MessageContext _messageContext = new
org.apache.axis2.context.MessageContext() ;
        _messageContext.setEnvelope(env);

        // add the message contxt to the operation client
        _operationClient.addMessageContext(_messageContext);



                           _operationClient.setCallback(new
org.apache.axis2.client.async.Callback() {
                    public void onComplete(
                            org.apache.axis2.client.async.AsyncResult result) {
                        java.lang.Object object =
fromOM(result.getResponseEnvelope().getBody().getFirstElement(),

org.tempuri.MyServiceStub.MyOperation1Response.class,

getEnvelopeNamespaces(result.getResponseEnvelope())
                            );

callback.receiveResultMyOperation1((org.tempuri.MyServiceStub.MyOperation1Response)
object);
                    }

                    public void onError(java.lang.Exception e) {
                        callback.receiveErrorMyOperation1(e);
                    }
                });


          org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
        if ( _operations[0].getMessageReceiver()==null &&
_operationClient.getOptions().isUseSeparateListener()) {
           _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
          _operations[0].setMessageReceiver(
                    _callbackReceiver);
        }

           //execute the operation client
           _operationClient.execute(false);

                    }

clearly it is sending  SOAP Action which is matching with SOAP action
in the wsdl for the method.

Can any one help on this issue?

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


RE: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service

Posted by "Sampige, Srinivas" <SS...@DIRECTV.com>.
I figured how the other namespace has crept. I am generating a single
client for 2 WSDLS.   The 2 WSDLs expose different functionalities but
have most of the types the same. The types are inlined (as you saw in
the attached WSDL). So, when the stub against the 2nd WSDL gets
generated the same TimeCode element gets generated with the the new
namespace. 

 

Do I have a workaround without modifying the WSDLs and without altering
the way the clients are being generated presently? 

 

Thanks

Srinivas

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
Sent: Tuesday, April 17, 2007 9:49 PM
To: axis-user@ws.apache.org
Subject: Re: axis2 - ADB , XMLBeans : service difference. Error while
invoking different implementations of the same service

 

This is a problem with the request.

In your schema target namespace is
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ 
 <s:schema elementFormDefault="qualified" 
 
targetNamespace="http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServ
ices/">

and TimeCode element is like this 
<s:complexType name="TimeCode">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="Time"
type="s:string"/> 
                </s:sequence>
            </s:complexType>

So that the Time element should be in the
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ namespace.

But your request is 
<StartTime>
                        <Time
xmlns="http://www.example.org/AsRun">11:10:09:00</Time>
                    </StartTime>

So the Time elemnet is in http://www.example.org/AsRun. 
this is the problem which creates the problem with the ADB service.

Any way how this namespace name have come here? I can not see this in
the wsdl. But I feel this is a valid jira since xmlbeans client does not
generates the request correctly. please log a jira.

Does this work properly with the adb client? 

Amila.



On 4/18/07, Ajith Ranabahu <aj...@gmail.com> wrote:

Hi,
The failure you are seeing is probably not due to the client but
thrown from the server and reported by the client as an exception. The
general cause of this error message is the presence of an incompatible
element in the XML.
However in your case the XMLBeans service works which means there is
no probs with the client and hence this could well be a bug in ADB
(may restriction handling which was a recent addition)
In any case see whether you can use tcpmon to capture a few message.

Ajith

On 4/17/07, Sampige, Srinivas <SS...@directv.com> wrote:
> I have implemented 2 versions of the same webservice; one using ADB
and 
> the other using XMLBeans binding. Both services have the same exact
> WSDL. I generated a client using xmlbeans binding which works fine
> against the service using xmlbeans. But, the same client when pointed 
> against the service using ADB binding the, client fails with "
> Unexpected subelement"
>
> -------------------------------
> org.apache.axis2.AxisFault: java.lang.RuntimeException : Unexpected
> subelement Time
>         at
>
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
> ation.java:271)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.execute
(OutInAxisO
> peration.java:202)
>         at
>
com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S
> cheduleServiceStub.java:152)
>         at
>
com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po

> stSchedule(ScheduleReceiveServiceClientHelper.java:112)
>         at
>
com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche
> duleServiceClientSample.java:157)
> ---------------------------------- 
>
> From my understanding, given a WSDL, when we generate a client it
should
> work regardless of how the service is implemented correct?(transparent
> to the client hence the very purpose of the WSDL right?). 
>
> I am running Axis2-1.1.1 on Tomcat 5.5.23
>
> I have attached 2 files=
>    1) the wsdl itself  (scheduleService.wsdl)
>    2) the request/response output from tcpmon in the 2 cases 
> (adbxmlbeans.txt)
>
> I followed steps outlined in
>
http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub

> element-value-t3489089.html but I cannot get to the stage where I can
> see the response in the scenario when it fails.
>
>
> Thanks in advance
> Srinivas
>
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org 
>
>


--
Ajith Ranabahu

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




-- 
Amila Suriarachchi,
WSO2 Inc. 


RE: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service

Posted by "Sampige, Srinivas" <SS...@DIRECTV.com>.
I found the section of auto generated code causing the problem -

 

 

/**

 * An XML TimeCode(@http://www.example.org/AsRun).

 *

 * This is a complex type.

 */

public class TimeCodeImpl extends
org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
com.directv.dtss.itx.client.TimeCode

{

    

    public TimeCodeImpl(org.apache.xmlbeans.SchemaType sType)

    {

        super(sType);

    }

    

    private static final javax.xml.namespace.QName TIME$0 = 

        new javax.xml.namespace.QName("http://www.example.org/AsRun",
"Time");

 

    

--------    

    

 

How do I programmatically, at runtime determine the appropriate
namespace to set for TIME$0 ? I want to use this as a work around if
possible ->

 

    public TimeCodeImpl(org.apache.xmlbeans.SchemaType sType)

    {

        super(sType);

        String someNameSpace = schemaTargetNameSpace (WHAT?? How do I
determine?)

        //"http://www.example.org/AsRun"

        TIME$0 = new javax.xml.namespace.QName(schemaTargetNameSpace,
"Time");

 

    }

    

    private static javax.xml.namespace.QName TIME$0 = null;

 

 

 

 

 

 

 

 

 

 

 

Thanks

Srinivas

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
Sent: Tuesday, April 17, 2007 9:49 PM
To: axis-user@ws.apache.org
Subject: Re: axis2 - ADB , XMLBeans : service difference. Error while
invoking different implementations of the same service

 

This is a problem with the request.

In your schema target namespace is
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ 
 <s:schema elementFormDefault="qualified" 
 
targetNamespace="http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServ
ices/">

and TimeCode element is like this 
<s:complexType name="TimeCode">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="Time"
type="s:string"/> 
                </s:sequence>
            </s:complexType>

So that the Time element should be in the
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ namespace.

But your request is 
<StartTime>
                        <Time
xmlns="http://www.example.org/AsRun">11:10:09:00</Time>
                    </StartTime>

So the Time elemnet is in http://www.example.org/AsRun. 
this is the problem which creates the problem with the ADB service.

Any way how this namespace name have come here? I can not see this in
the wsdl. But I feel this is a valid jira since xmlbeans client does not
generates the request correctly. please log a jira.

Does this work properly with the adb client? 

Amila.



On 4/18/07, Ajith Ranabahu <aj...@gmail.com> wrote:

Hi,
The failure you are seeing is probably not due to the client but
thrown from the server and reported by the client as an exception. The
general cause of this error message is the presence of an incompatible
element in the XML.
However in your case the XMLBeans service works which means there is
no probs with the client and hence this could well be a bug in ADB
(may restriction handling which was a recent addition)
In any case see whether you can use tcpmon to capture a few message.

Ajith

On 4/17/07, Sampige, Srinivas <SS...@directv.com> wrote:
> I have implemented 2 versions of the same webservice; one using ADB
and 
> the other using XMLBeans binding. Both services have the same exact
> WSDL. I generated a client using xmlbeans binding which works fine
> against the service using xmlbeans. But, the same client when pointed 
> against the service using ADB binding the, client fails with "
> Unexpected subelement"
>
> -------------------------------
> org.apache.axis2.AxisFault: java.lang.RuntimeException : Unexpected
> subelement Time
>         at
>
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
> ation.java:271)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.execute
(OutInAxisO
> peration.java:202)
>         at
>
com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S
> cheduleServiceStub.java:152)
>         at
>
com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po

> stSchedule(ScheduleReceiveServiceClientHelper.java:112)
>         at
>
com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche
> duleServiceClientSample.java:157)
> ---------------------------------- 
>
> From my understanding, given a WSDL, when we generate a client it
should
> work regardless of how the service is implemented correct?(transparent
> to the client hence the very purpose of the WSDL right?). 
>
> I am running Axis2-1.1.1 on Tomcat 5.5.23
>
> I have attached 2 files=
>    1) the wsdl itself  (scheduleService.wsdl)
>    2) the request/response output from tcpmon in the 2 cases 
> (adbxmlbeans.txt)
>
> I followed steps outlined in
>
http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub

> element-value-t3489089.html but I cannot get to the stage where I can
> see the response in the scenario when it fails.
>
>
> Thanks in advance
> Srinivas
>
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org 
>
>


--
Ajith Ranabahu

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




-- 
Amila Suriarachchi,
WSO2 Inc. 


Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service

Posted by Amila Suriarachchi <am...@gmail.com>.
This is a problem with the request.

In your schema target namespace is
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/
 <s:schema elementFormDefault="qualified"
                  targetNamespace="
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/">

and TimeCode element is like this
<s:complexType name="TimeCode">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="Time"
type="s:string"/>
                </s:sequence>
            </s:complexType>

So that the Time element should be in the
http://Omnibus.US.ItxDirecTV.WebServices.SchedulingServices/ namespace.

But your request is
<StartTime>
                        <Time xmlns="http://www.example.org/AsRun
">11:10:09:00</Time>
                    </StartTime>

So the Time elemnet is in http://www.example.org/AsRun.
this is the problem which creates the problem with the ADB service.

Any way how this namespace name have come here? I can not see this in the
wsdl. But I feel this is a valid jira since xmlbeans client does not
generates the request correctly. please log a jira.

Does this work properly with the adb client?

Amila.


On 4/18/07, Ajith Ranabahu <aj...@gmail.com> wrote:
>
> Hi,
> The failure you are seeing is probably not due to the client but
> thrown from the server and reported by the client as an exception. The
> general cause of this error message is the presence of an incompatible
> element in the XML.
> However in your case the XMLBeans service works which means there is
> no probs with the client and hence this could well be a bug in ADB
> (may restriction handling which was a recent addition)
> In any case see whether you can use tcpmon to capture a few message.
>
> Ajith
>
> On 4/17/07, Sampige, Srinivas <SS...@directv.com> wrote:
> > I have implemented 2 versions of the same webservice; one using ADB and
> > the other using XMLBeans binding. Both services have the same exact
> > WSDL. I generated a client using xmlbeans binding which works fine
> > against the service using xmlbeans. But, the same client when pointed
> > against the service using ADB binding the, client fails with "
> > Unexpected subelement"
> >
> > -------------------------------
> > org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected
> > subelement Time
> >         at
> > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
> > ation.java:271)
> >         at
> > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
> > peration.java:202)
> >         at
> > com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S
> > cheduleServiceStub.java:152)
> >         at
> > com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po
> > stSchedule(ScheduleReceiveServiceClientHelper.java:112)
> >         at
> > com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche
> > duleServiceClientSample.java:157)
> > ----------------------------------
> >
> > From my understanding, given a WSDL, when we generate a client it should
> > work regardless of how the service is implemented correct?(transparent
> > to the client hence the very purpose of the WSDL right?).
> >
> > I am running Axis2-1.1.1 on Tomcat 5.5.23
> >
> > I have attached 2 files=
> >    1) the wsdl itself  (scheduleService.wsdl)
> >    2) the request/response output from tcpmon in the 2 cases
> > (adbxmlbeans.txt)
> >
> > I followed steps outlined in
> > http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub
> > element-value-t3489089.html but I cannot get to the stage where I can
> > see the response in the scenario when it fails.
> >
> >
> > Thanks in advance
> > Srinivas
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> --
> Ajith Ranabahu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service

Posted by Ajith Ranabahu <aj...@gmail.com>.
Hi,
The failure you are seeing is probably not due to the client but
thrown from the server and reported by the client as an exception. The
general cause of this error message is the presence of an incompatible
element in the XML.
However in your case the XMLBeans service works which means there is
no probs with the client and hence this could well be a bug in ADB
(may restriction handling which was a recent addition)
In any case see whether you can use tcpmon to capture a few message.

Ajith

On 4/17/07, Sampige, Srinivas <SS...@directv.com> wrote:
> I have implemented 2 versions of the same webservice; one using ADB and
> the other using XMLBeans binding. Both services have the same exact
> WSDL. I generated a client using xmlbeans binding which works fine
> against the service using xmlbeans. But, the same client when pointed
> against the service using ADB binding the, client fails with "
> Unexpected subelement"
>
> -------------------------------
> org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected
> subelement Time
>         at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
> ation.java:271)
>         at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
> peration.java:202)
>         at
> com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S
> cheduleServiceStub.java:152)
>         at
> com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po
> stSchedule(ScheduleReceiveServiceClientHelper.java:112)
>         at
> com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche
> duleServiceClientSample.java:157)
> ----------------------------------
>
> From my understanding, given a WSDL, when we generate a client it should
> work regardless of how the service is implemented correct?(transparent
> to the client hence the very purpose of the WSDL right?).
>
> I am running Axis2-1.1.1 on Tomcat 5.5.23
>
> I have attached 2 files=
>    1) the wsdl itself  (scheduleService.wsdl)
>    2) the request/response output from tcpmon in the 2 cases
> (adbxmlbeans.txt)
>
> I followed steps outlined in
> http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub
> element-value-t3489089.html but I cannot get to the stage where I can
> see the response in the scenario when it fails.
>
>
> Thanks in advance
> Srinivas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Ajith Ranabahu

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


Re: Axis fault accessing WCF web service with WsHttpBinding

Posted by shantanu chawla <sh...@gmail.com>.
Hi Martin,

I am using axis2 in a standalone client java application with Axis2
jars in my class path. I dont see conf/axis2.xml in my path.

Any help
Shantanu

On 4/17/07, Martin Gainty <mg...@hotmail.com> wrote:
> hello shantanu
>
> if you look at
> %AXIS2_HOME%/conf/axis2.xml
>     <!-- Comment this next entry with !-- to disable Addressing -->
>     <module ref="addressing"/>
>
> M--
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message -----
> From: "shantanu chawla" <sh...@gmail.com>
> To: <ax...@ws.apache.org>
> Sent: Tuesday, April 17, 2007 7:00 PM
> Subject: Re: Axis fault accessing WCF web service with WsHttpBinding
>
>
> > Hi David,
> >
> > I am new to Axis2. Can you tell how do i engage or disengage addressing
> > module.
> >
> > Thanks
> > Shantanu
> >
> > On 4/17/07, David Illsley <da...@gmail.com> wrote:
> >> From a quick glance, I can't see you engaging the addressing module, I
> >> think, perhaps you should be.
> >>
> >> If you're not doing that, the error message sort of makes sense as
> >> there wouldn't be
> >> an action in the message.
> >>
> >> HTH,
> >> David
> >>
> >> On 16/04/07, shantanu chawla <sh...@gmail.com> wrote:
> >> > I am creating a client in java using axis2 1.1.1 to test
> >> > interoperability with WCF web services. My WCF web service is based on
> >> > wsHttpBinding. When I am trying to call its methods I am getting this
> >> > axis fault error.
> >> >
> >> > org.apache.axis2.AxisFault: The SOAP action specified on the message,
> >> > '', does not match the HTTP SOAP Action,
> >> > 'http://tempuri.org/IMyService/MyOperation1'.
> >> >
> >> > My wsdl 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>
> >> >   <wsaw:UsingAddressing />
> >> >   </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>
> >> >   <soap12:body use="literal" />
> >> >   </wsdl:input>
> >> > <wsdl:output>
> >> >   <soap12:body use="literal" />
> >> >   </wsdl:output>
> >> >   </wsdl:operation>
> >> > <wsdl:operation name="MyOperation2">
> >> >   <soap12:operation
> >> > soapAction="http://tempuri.org/IMyService/MyOperation2"
> >> > 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="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>
> >> >   </wsa10:EndpointReference>
> >> >   </wsdl:port>
> >> >   </wsdl:service>
> >> >   </wsdl:definitions>
> >> >
> >> > and the java code of the stub generated by axis is
> >> >
> >> >    public  void startMyOperation1(
> >> >
> >> >                  org.tempuri.MyServiceStub.MyOperation1 param4,
> >> >
> >> >                   final org.tempuri.MyServiceCallbackHandler callback)
> >> >
> >> >                 throws java.rmi.RemoteException{
> >> >
> >> >               org.apache.axis2.client.OperationClient _operationClient
> >> > = _serviceClient.createClient(_operations[0].getName());
> >> >
> >> > _operationClient.getOptions().setAction("http://tempuri.org/IMyService/MyOperation1");
> >> >
> >> > _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
> >> >
> >> >
> >> >
> >> >               // create SOAP envelope with that payload
> >> >               org.apache.axiom.soap.SOAPEnvelope env=null;
> >> >
> >> >                                     //Style is Doc.
> >> >
> >> >
> >> >                                                     env =
> >> > toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
> >> >                                                     param4,
> >> >
> >> > optimizeContent(new javax.xml.namespace.QName("",
> >> >                                                     "MyOperation1")));
> >> >
> >> >         //adding SOAP headers
> >> >          _serviceClient.addHeadersToEnvelope(env);
> >> >         // create message context with that soap envelope
> >> >         org.apache.axis2.context.MessageContext _messageContext = new
> >> > org.apache.axis2.context.MessageContext() ;
> >> >         _messageContext.setEnvelope(env);
> >> >
> >> >         // add the message contxt to the operation client
> >> >         _operationClient.addMessageContext(_messageContext);
> >> >
> >> >
> >> >
> >> >                            _operationClient.setCallback(new
> >> > org.apache.axis2.client.async.Callback() {
> >> >                     public void onComplete(
> >> >                             org.apache.axis2.client.async.AsyncResult
> >> > result) {
> >> >                         java.lang.Object object =
> >> > fromOM(result.getResponseEnvelope().getBody().getFirstElement(),
> >> >
> >> > org.tempuri.MyServiceStub.MyOperation1Response.class,
> >> >
> >> > getEnvelopeNamespaces(result.getResponseEnvelope())
> >> >                             );
> >> >
> >> > callback.receiveResultMyOperation1((org.tempuri.MyServiceStub.MyOperation1Response)
> >> > object);
> >> >                     }
> >> >
> >> >                     public void onError(java.lang.Exception e) {
> >> >                         callback.receiveErrorMyOperation1(e);
> >> >                     }
> >> >                 });
> >> >
> >> >
> >> >           org.apache.axis2.util.CallbackReceiver _callbackReceiver =
> >> > null;
> >> >         if ( _operations[0].getMessageReceiver()==null &&
> >> > _operationClient.getOptions().isUseSeparateListener()) {
> >> >            _callbackReceiver = new
> >> > org.apache.axis2.util.CallbackReceiver();
> >> >           _operations[0].setMessageReceiver(
> >> >                     _callbackReceiver);
> >> >         }
> >> >
> >> >            //execute the operation client
> >> >            _operationClient.execute(false);
> >> >
> >> >                     }
> >> >
> >> > clearly it is sending  SOAP Action which is matching with SOAP action
> >> > in the wsdl for the method.
> >> >
> >> > Can any one help on this issue?
> >> >
> >> > 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
> >> >
> >> >
> >>
> >>
> >> --
> >> David Illsley - IBM Web Services Development
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
> > --
> > 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
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
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


Re: axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning

My question is how is the XML schema definition could be imported without 
ref'ng a valid XMLSchema from namespace attribute?
I would suggest looking at this example from 
/samples/databinding/stockquote/StockQuote.xsd

//remember to import the namespace in your .wsdl via import statement e.g.
 <import 
namespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote" 
location="StockQuote.xsd" />

//In the wsdl we can import our own parameters based on the getStockQuote
<message name="getStockQuoteReq">
  <part name="parameters" element="types:getStockQuote" />
 </message>

//Display of Contents of StockQuote.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 targetNamespace="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"
 xmlns="http://w3.ibm.com/schemas/services/2002/11/15/stockquote"
>
 <xsd:element name="quote">
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element name="symbol" type="xsd:string"/>
    <xsd:element name="volume" type="xsd:integer"/>
    <xsd:element name="lastTrade" type="lastTradeType"/>
    <xsd:element name="change" type="changeType"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>
 <xsd:complexType name="changeType">
  <xsd:sequence>
   <xsd:element name="dollar" type="xsd:float"/>
   <xsd:element name="percent" type="xsd:float"/>
   <xsd:element name="positive" type="xsd:boolean"/>
  </xsd:sequence>
 </xsd:complexType>
 <xsd:complexType name="lastTradeType">
  <xsd:sequence>
   <xsd:element name="price" type="xsd:float"/>
   <xsd:element name="date" type="xsd:long"/>
  </xsd:sequence>
 </xsd:complexType>

 <!-- Methods signatures -->
 <xsd:element name="getStockQuote">
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element name="symbol" type="xsd:string"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>
 <xsd:element name="getStockQuoteResponse">
  <xsd:complexType>
   <xsd:sequence>
    <xsd:element ref="quote" />
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>
</xsd:schema>

I suggest using a Working (.xsd) example/ modify the xsd elements to suit 
your own requirements..once defined in the imported xsd / then reference 
those types in the wsdl

Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "Sampige, Srinivas" <SS...@DIRECTV.com>
To: <ax...@ws.apache.org>; "Martin Gainty" <mg...@hotmail.com>
Sent: Tuesday, April 17, 2007 9:29 PM
Subject: axis2 - ADB , XMLBeans : service difference. Error while invoking 
different implementations of the same service


I have implemented 2 versions of the same webservice; one using ADB and
the other using XMLBeans binding. Both services have the same exact
WSDL. I generated a client using xmlbeans binding which works fine
against the service using xmlbeans. But, the same client when pointed
against the service using ADB binding the, client fails with "
Unexpected subelement"

-------------------------------
org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected
subelement Time
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:271)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:202)
at
com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S
cheduleServiceStub.java:152)
at
com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po
stSchedule(ScheduleReceiveServiceClientHelper.java:112)
at
com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche
duleServiceClientSample.java:157)
----------------------------------

>From my understanding, given a WSDL, when we generate a client it should
work regardless of how the service is implemented correct?(transparent
to the client hence the very purpose of the WSDL right?).

I am running Axis2-1.1.1 on Tomcat 5.5.23

I have attached 2 files=
   1) the wsdl itself  (scheduleService.wsdl)
   2) the request/response output from tcpmon in the 2 cases
(adbxmlbeans.txt)

I followed steps outlined in
http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub
element-value-t3489089.html but I cannot get to the stage where I can
see the response in the scenario when it fails.


Thanks in advance
Srinivas



--------------------------------------------------------------------------------


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


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


axis2 - ADB , XMLBeans : service difference. Error while invoking different implementations of the same service

Posted by "Sampige, Srinivas" <SS...@DIRECTV.com>.
I have implemented 2 versions of the same webservice; one using ADB and
the other using XMLBeans binding. Both services have the same exact
WSDL. I generated a client using xmlbeans binding which works fine
against the service using xmlbeans. But, the same client when pointed
against the service using ADB binding the, client fails with "
Unexpected subelement"

-------------------------------
org.apache.axis2.AxisFault: java.lang.RuntimeException: Unexpected
subelement Time
	at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:271)
	at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:202)
	at
com.directv.dtss.itx.client.ScheduleServiceStub.ScheduleReceiveService(S
cheduleServiceStub.java:152)
	at
com.directv.dtss.itx.client.helper.ScheduleReceiveServiceClientHelper.po
stSchedule(ScheduleReceiveServiceClientHelper.java:112)
	at
com.directv.dtss.itx.client.sample.ScheduleServiceClientSample.main(Sche
duleServiceClientSample.java:157)
----------------------------------

>From my understanding, given a WSDL, when we generate a client it should
work regardless of how the service is implemented correct?(transparent
to the client hence the very purpose of the WSDL right?).

I am running Axis2-1.1.1 on Tomcat 5.5.23

I have attached 2 files=
   1) the wsdl itself  (scheduleService.wsdl)
   2) the request/response output from tcpmon in the 2 cases
(adbxmlbeans.txt)

I followed steps outlined in
http://www.nabble.com/-Axix2--java.lang.RuntimeException:-Unexpected-sub
element-value-t3489089.html but I cannot get to the stage where I can
see the response in the scenario when it fails.


Thanks in advance
Srinivas

Re: Axis fault accessing WCF web service with WsHttpBinding

Posted by Martin Gainty <mg...@hotmail.com>.
hello shantanu

if you look at
%AXIS2_HOME%/conf/axis2.xml
    <!-- Comment this next entry with !-- to disable Addressing -->
    <module ref="addressing"/>

M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

----- Original Message ----- 
From: "shantanu chawla" <sh...@gmail.com>
To: <ax...@ws.apache.org>
Sent: Tuesday, April 17, 2007 7:00 PM
Subject: Re: Axis fault accessing WCF web service with WsHttpBinding


> Hi David,
>
> I am new to Axis2. Can you tell how do i engage or disengage addressing 
> module.
>
> Thanks
> Shantanu
>
> On 4/17/07, David Illsley <da...@gmail.com> wrote:
>> From a quick glance, I can't see you engaging the addressing module, I
>> think, perhaps you should be.
>>
>> If you're not doing that, the error message sort of makes sense as
>> there wouldn't be
>> an action in the message.
>>
>> HTH,
>> David
>>
>> On 16/04/07, shantanu chawla <sh...@gmail.com> wrote:
>> > I am creating a client in java using axis2 1.1.1 to test
>> > interoperability with WCF web services. My WCF web service is based on
>> > wsHttpBinding. When I am trying to call its methods I am getting this
>> > axis fault error.
>> >
>> > org.apache.axis2.AxisFault: The SOAP action specified on the message,
>> > '', does not match the HTTP SOAP Action,
>> > 'http://tempuri.org/IMyService/MyOperation1'.
>> >
>> > My wsdl 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>
>> >   <wsaw:UsingAddressing />
>> >   </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>
>> >   <soap12:body use="literal" />
>> >   </wsdl:input>
>> > <wsdl:output>
>> >   <soap12:body use="literal" />
>> >   </wsdl:output>
>> >   </wsdl:operation>
>> > <wsdl:operation name="MyOperation2">
>> >   <soap12:operation
>> > soapAction="http://tempuri.org/IMyService/MyOperation2"
>> > 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="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>
>> >   </wsa10:EndpointReference>
>> >   </wsdl:port>
>> >   </wsdl:service>
>> >   </wsdl:definitions>
>> >
>> > and the java code of the stub generated by axis is
>> >
>> >    public  void startMyOperation1(
>> >
>> >                  org.tempuri.MyServiceStub.MyOperation1 param4,
>> >
>> >                   final org.tempuri.MyServiceCallbackHandler callback)
>> >
>> >                 throws java.rmi.RemoteException{
>> >
>> >               org.apache.axis2.client.OperationClient _operationClient
>> > = _serviceClient.createClient(_operations[0].getName());
>> > 
>> > _operationClient.getOptions().setAction("http://tempuri.org/IMyService/MyOperation1");
>> > 
>> > _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
>> >
>> >
>> >
>> >               // create SOAP envelope with that payload
>> >               org.apache.axiom.soap.SOAPEnvelope env=null;
>> >
>> >                                     //Style is Doc.
>> >
>> >
>> >                                                     env =
>> > toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
>> >                                                     param4,
>> >
>> > optimizeContent(new javax.xml.namespace.QName("",
>> >                                                     "MyOperation1")));
>> >
>> >         //adding SOAP headers
>> >          _serviceClient.addHeadersToEnvelope(env);
>> >         // create message context with that soap envelope
>> >         org.apache.axis2.context.MessageContext _messageContext = new
>> > org.apache.axis2.context.MessageContext() ;
>> >         _messageContext.setEnvelope(env);
>> >
>> >         // add the message contxt to the operation client
>> >         _operationClient.addMessageContext(_messageContext);
>> >
>> >
>> >
>> >                            _operationClient.setCallback(new
>> > org.apache.axis2.client.async.Callback() {
>> >                     public void onComplete(
>> >                             org.apache.axis2.client.async.AsyncResult 
>> > result) {
>> >                         java.lang.Object object =
>> > fromOM(result.getResponseEnvelope().getBody().getFirstElement(),
>> >
>> > org.tempuri.MyServiceStub.MyOperation1Response.class,
>> >
>> > getEnvelopeNamespaces(result.getResponseEnvelope())
>> >                             );
>> >
>> > callback.receiveResultMyOperation1((org.tempuri.MyServiceStub.MyOperation1Response)
>> > object);
>> >                     }
>> >
>> >                     public void onError(java.lang.Exception e) {
>> >                         callback.receiveErrorMyOperation1(e);
>> >                     }
>> >                 });
>> >
>> >
>> >           org.apache.axis2.util.CallbackReceiver _callbackReceiver = 
>> > null;
>> >         if ( _operations[0].getMessageReceiver()==null &&
>> > _operationClient.getOptions().isUseSeparateListener()) {
>> >            _callbackReceiver = new 
>> > org.apache.axis2.util.CallbackReceiver();
>> >           _operations[0].setMessageReceiver(
>> >                     _callbackReceiver);
>> >         }
>> >
>> >            //execute the operation client
>> >            _operationClient.execute(false);
>> >
>> >                     }
>> >
>> > clearly it is sending  SOAP Action which is matching with SOAP action
>> > in the wsdl for the method.
>> >
>> > Can any one help on this issue?
>> >
>> > 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
>> >
>> >
>>
>>
>> --
>> David Illsley - IBM Web Services Development
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>
>
> -- 
> 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
>
> 


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


Re: Axis fault accessing WCF web service with WsHttpBinding

Posted by shantanu chawla <sh...@gmail.com>.
Hi David,

I am new to Axis2. Can you tell how do i engage or disengage addressing module.

Thanks
Shantanu

On 4/17/07, David Illsley <da...@gmail.com> wrote:
> From a quick glance, I can't see you engaging the addressing module, I
> think, perhaps you should be.
>
> If you're not doing that, the error message sort of makes sense as
> there wouldn't be
> an action in the message.
>
> HTH,
> David
>
> On 16/04/07, shantanu chawla <sh...@gmail.com> wrote:
> > I am creating a client in java using axis2 1.1.1 to test
> > interoperability with WCF web services. My WCF web service is based on
> > wsHttpBinding. When I am trying to call its methods I am getting this
> > axis fault error.
> >
> > org.apache.axis2.AxisFault: The SOAP action specified on the message,
> > '', does not match the HTTP SOAP Action,
> > 'http://tempuri.org/IMyService/MyOperation1'.
> >
> > My wsdl 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>
> >   <wsaw:UsingAddressing />
> >   </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>
> >   <soap12:body use="literal" />
> >   </wsdl:input>
> > <wsdl:output>
> >   <soap12:body use="literal" />
> >   </wsdl:output>
> >   </wsdl:operation>
> > <wsdl:operation name="MyOperation2">
> >   <soap12:operation
> > soapAction="http://tempuri.org/IMyService/MyOperation2"
> > 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="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>
> >   </wsa10:EndpointReference>
> >   </wsdl:port>
> >   </wsdl:service>
> >   </wsdl:definitions>
> >
> > and the java code of the stub generated by axis is
> >
> >    public  void startMyOperation1(
> >
> >                  org.tempuri.MyServiceStub.MyOperation1 param4,
> >
> >                   final org.tempuri.MyServiceCallbackHandler callback)
> >
> >                 throws java.rmi.RemoteException{
> >
> >               org.apache.axis2.client.OperationClient _operationClient
> > = _serviceClient.createClient(_operations[0].getName());
> >              _operationClient.getOptions().setAction("http://tempuri.org/IMyService/MyOperation1");
> >      _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
> >
> >
> >
> >               // create SOAP envelope with that payload
> >               org.apache.axiom.soap.SOAPEnvelope env=null;
> >
> >                                     //Style is Doc.
> >
> >
> >                                                     env =
> > toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
> >                                                     param4,
> >
> > optimizeContent(new javax.xml.namespace.QName("",
> >                                                     "MyOperation1")));
> >
> >         //adding SOAP headers
> >          _serviceClient.addHeadersToEnvelope(env);
> >         // create message context with that soap envelope
> >         org.apache.axis2.context.MessageContext _messageContext = new
> > org.apache.axis2.context.MessageContext() ;
> >         _messageContext.setEnvelope(env);
> >
> >         // add the message contxt to the operation client
> >         _operationClient.addMessageContext(_messageContext);
> >
> >
> >
> >                            _operationClient.setCallback(new
> > org.apache.axis2.client.async.Callback() {
> >                     public void onComplete(
> >                             org.apache.axis2.client.async.AsyncResult result) {
> >                         java.lang.Object object =
> > fromOM(result.getResponseEnvelope().getBody().getFirstElement(),
> >
> > org.tempuri.MyServiceStub.MyOperation1Response.class,
> >
> > getEnvelopeNamespaces(result.getResponseEnvelope())
> >                             );
> >
> > callback.receiveResultMyOperation1((org.tempuri.MyServiceStub.MyOperation1Response)
> > object);
> >                     }
> >
> >                     public void onError(java.lang.Exception e) {
> >                         callback.receiveErrorMyOperation1(e);
> >                     }
> >                 });
> >
> >
> >           org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
> >         if ( _operations[0].getMessageReceiver()==null &&
> > _operationClient.getOptions().isUseSeparateListener()) {
> >            _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
> >           _operations[0].setMessageReceiver(
> >                     _callbackReceiver);
> >         }
> >
> >            //execute the operation client
> >            _operationClient.execute(false);
> >
> >                     }
> >
> > clearly it is sending  SOAP Action which is matching with SOAP action
> > in the wsdl for the method.
> >
> > Can any one help on this issue?
> >
> > 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
> >
> >
>
>
> --
> David Illsley - IBM Web Services Development
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
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


Re: Axis fault accessing WCF web service with WsHttpBinding

Posted by David Illsley <da...@gmail.com>.
>From a quick glance, I can't see you engaging the addressing module, I
think, perhaps you should be.

If you're not doing that, the error message sort of makes sense as
there wouldn't be
an action in the message.

HTH,
David

On 16/04/07, shantanu chawla <sh...@gmail.com> wrote:
> I am creating a client in java using axis2 1.1.1 to test
> interoperability with WCF web services. My WCF web service is based on
> wsHttpBinding. When I am trying to call its methods I am getting this
> axis fault error.
>
> org.apache.axis2.AxisFault: The SOAP action specified on the message,
> '', does not match the HTTP SOAP Action,
> 'http://tempuri.org/IMyService/MyOperation1'.
>
> My wsdl 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>
>   <wsaw:UsingAddressing />
>   </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>
>   <soap12:body use="literal" />
>   </wsdl:input>
> <wsdl:output>
>   <soap12:body use="literal" />
>   </wsdl:output>
>   </wsdl:operation>
> <wsdl:operation name="MyOperation2">
>   <soap12:operation
> soapAction="http://tempuri.org/IMyService/MyOperation2"
> 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="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>
>   </wsa10:EndpointReference>
>   </wsdl:port>
>   </wsdl:service>
>   </wsdl:definitions>
>
> and the java code of the stub generated by axis is
>
>    public  void startMyOperation1(
>
>                  org.tempuri.MyServiceStub.MyOperation1 param4,
>
>                   final org.tempuri.MyServiceCallbackHandler callback)
>
>                 throws java.rmi.RemoteException{
>
>               org.apache.axis2.client.OperationClient _operationClient
> = _serviceClient.createClient(_operations[0].getName());
>              _operationClient.getOptions().setAction("http://tempuri.org/IMyService/MyOperation1");
>      _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
>
>
>
>               // create SOAP envelope with that payload
>               org.apache.axiom.soap.SOAPEnvelope env=null;
>
>                                     //Style is Doc.
>
>
>                                                     env =
> toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
>                                                     param4,
>
> optimizeContent(new javax.xml.namespace.QName("",
>                                                     "MyOperation1")));
>
>         //adding SOAP headers
>          _serviceClient.addHeadersToEnvelope(env);
>         // create message context with that soap envelope
>         org.apache.axis2.context.MessageContext _messageContext = new
> org.apache.axis2.context.MessageContext() ;
>         _messageContext.setEnvelope(env);
>
>         // add the message contxt to the operation client
>         _operationClient.addMessageContext(_messageContext);
>
>
>
>                            _operationClient.setCallback(new
> org.apache.axis2.client.async.Callback() {
>                     public void onComplete(
>                             org.apache.axis2.client.async.AsyncResult result) {
>                         java.lang.Object object =
> fromOM(result.getResponseEnvelope().getBody().getFirstElement(),
>
> org.tempuri.MyServiceStub.MyOperation1Response.class,
>
> getEnvelopeNamespaces(result.getResponseEnvelope())
>                             );
>
> callback.receiveResultMyOperation1((org.tempuri.MyServiceStub.MyOperation1Response)
> object);
>                     }
>
>                     public void onError(java.lang.Exception e) {
>                         callback.receiveErrorMyOperation1(e);
>                     }
>                 });
>
>
>           org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
>         if ( _operations[0].getMessageReceiver()==null &&
> _operationClient.getOptions().isUseSeparateListener()) {
>            _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
>           _operations[0].setMessageReceiver(
>                     _callbackReceiver);
>         }
>
>            //execute the operation client
>            _operationClient.execute(false);
>
>                     }
>
> clearly it is sending  SOAP Action which is matching with SOAP action
> in the wsdl for the method.
>
> Can any one help on this issue?
>
> 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
>
>


-- 
David Illsley - IBM Web Services Development

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