Org.apache.axis2.AxisFault:namespace mismatch require http://********/scheme/1.0 found

Source: Internet
Author: User


Error org.apache.axis2.AxisFault:namespace mismatch require http://webserviceTest/scheme/1.0 found http:// 127.0.0.1:8080/webservice/services/testservice



Import Org.apache.axis.client.Call;
Import Org.apache.axis.client.Service;

Service service = new service (); Call call = (call) Service.createcall ();


String url= "Http://127.0.0.1:8080/webservice/services/testService";
Call.settargetendpointaddress (New Java.net.URL (URL));
Call.setsoapactionuri ("Testservice");
Call.setoperationname (new QName (URL, "invoke"));

Call the service interface and get the response XML message

String rstxml= (String) Call.invoke (new object[] {reqxml});



Code instead

Service service = new service (); Call call = (call) Service.createcall ();


String url= "Http://127.0.0.1:8080/webservice/services/testService";
Call.settargetendpointaddress (New Java.net.URL (URL));
Call.setsoapactionuri ("Testservice");
Call.setoperationname (New QName ("http://webserviceTest/scheme/1.0", "invoke"));

Call the service interface and get the response XML message

String rstxml= (String) Call.invoke (new object[] {reqxml});


Configuration of Service.xml

<service name= "Testservice" targetnamespace= "Http://webserviceTest.net" >
<description>
</description>
<parameter name= "ServiceClass" >
Cn.com.interfaces.testService
</parameter>

<schema schemanamespace= "http://webserviceTest/scheme/1.0"/>

<!--define method handlers-->
<messageReceivers>
<messagereceiver mep= "Http://www.w3.org/2004/08/wsdl/in-out" class= " Org.apache.axis2.rpc.receivers.RPCMessageReceiver "/>
<messagereceiver mep= "http://www.w3.org/2004/08/wsdl/in-only" class= " Org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver "/>
</messageReceivers>
</service>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.