Home > Net >  C # for the server, Java for the client, a Java call c # webservice, soap protocol, the five type st
C # for the server, Java for the client, a Java call c # webservice, soap protocol, the five type st

Time:09-17

C # code is as follows, at present, CSPID, and LSPID and int cmdResult take to these three values, returns the value of five Java there is, also grasp the network packet saw, but local does not take the


Using the BLL;
using System;
using System.Collections.Generic;
using System.Linq;
Using System. The Web;
//using System. Web. Script. Serialization;
Using System. Web. Services;
Using System. Web. Services. The Description;
Using System. Web. Services. Separate Protocols;
Using System. Xml;

The namespace WebEPG. Cis. Service
{

[WebService (Namespace="iptv")]
//[WebServiceBinding (ConformsTo=WsiProfiles. BasicProfile1_1)]
[WebServiceBinding (ConformsTo=WsiProfiles. None)]
[System.Com ponentModel ToolboxItem (false)]
//to allow the use of ASP.NET AJAX calls the Web service from the script, please uncomment the following line,
///System. Web. Script. Services. ScriptService]
[SoapDocumentService (RoutingStyle=SoapServiceRoutingStyle. RequestElement)]
Public class syncNotifyResp: System. Web. Services. WebService
{


[SoapRpcMethod (Use=SoapBindingUse. Literal Action="http://tempuri.org/ResultNotify", RequestNamespace="iptv," ResponseNamespace="iptv")]
[the WebMethod (MessageName="ResultNotifySoapIn")]//(MessageName="ResultNotifyWithName")
Public string ResultNotify (string CSPID, string LSPID, string correlateID, int cmdResult, string resultFileURL)
{
WebBLL web=new WebBLL ();
XmlDocument xmlDoc=new XmlDocument ();

Try
{
Web. InsertWebLog (" return ", "CSPID:" + + ", LSPID: "+ LSPID CSPID + + CorrelateID", CorrelateID: "+", ResultFileURL: "+ +", cmdResult: "+ cmdResult ResultFileURL, 20200401);

Return "0";
}
The catch (Exception ex)
{

Return the ex. ToString ();
}


}


}




}

CodePudding user response:

Don't tube what Java, you use webserivce test tools, test pass,

Don't choose what.net test tools, choose the third party standard testing tool (even in order to block the mouth of the Java, you can choose the third party test of Java write tools)

Test tool tuning impassability, you change, testing tools to transfer, Java,

Webservice test tools you baidu

CodePudding user response:

I use the postman tested, the other side of XML, or my side received only two or three parameters, the other two received, I don't know is my problem or the other side of the

<? The XML version="1.0" encoding="utf-8"?>






CodePudding user response:

So give you, standard testing process
1. Use the webservice studio testing tools, testing by
2. The use of fiddle the packet capture tools to intercept test tools standard HTTP packet
3 use the diff file comparison tool packet the standard test tools and Java for you compare

Ps: parameters using the same parameters, convenient,

Ah, this kind of thing, each one has his responsibility, your duty is to use standard testing tool tests pass, it was his duty to standard docking test through the interface,
Results your side to help him, he complained, why ah, maybe a Java eclipse, myeclipse itself has webserice standard testing tool and the calling code generated plug-in, which is as long as you test pass, simply don't have to make the arguments on both sides
  • Related