Using Wsexplorer and TCP/IP Monitor

Source: Internet
Author: User
Tags soap wsdl

Why use the Wsexplorer and TCP/IP Monitor tool

1, in order to better understand the process of WebService request

2. In order to get SOAP data sent and accepted formats

3, in order to monitor the interception of request headers and response to the specific data, using TCP/IP monitor

what is soap.

1. The SOAP protocol is actually a text protocol based on XML coding specification

2, Soap=http+xml

3. Use tools to view the XML encoding format of soap

4. Soap=simple object Access Protocol Simple object Accessing protocol

the format of soap

Calling WebService in MyEclipse can quickly validate your server-side programs, eliminating your own writing clients.

1: This is the message format sent:

<soapenv:envelope xmlns:soapenv= "http://schemas.xmlsoap.org/soap/envelope/" xmlns:q0= "http:// webxml.com.cn/"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001 /xmlschema-instance">

- <soapenv:Body>

- <q0:qqCheckOnline>

<q0:qqCode>489261098</q0:qqCode>

</q0:qqCheckOnline>

</soapenv:Body>

</soapenv:Envelope>

2: The following is the received XML format

<soap:envelope xmlns:soap= "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd= "http:// Www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

- <soap:Body>

- <qqcheckonlineresponse xmlns= "http://WebXml.com.cn/" >

<qqCheckOnlineResult>N</qqCheckOnlineResult>

</qqCheckOnlineResponse>

</soap:Body>

</soap:Envelope>

Use the MyEclipse TCP/IP Monitor tool to view the specific request process.

TCP/IP monitor can not only see the SOAP data, but also get the HTTP request and receive header information.

1, this tool is located in: Window>showview>other>myeclipse Common (common tools) >tcp/ipmonitor

2, this tool, equivalent to an agent, after starting it will listen to a local port, and then forward the request to the specified destination IP and port.

Once the data is fetched, the data is returned to the customer intact. In the eyes of customers, always first access should be this agent, otherwise

We will not see the process of data transfer.

3, configuration options:

On the open TCP/IP Monitor Interface: View Menu (small arrow at the top right) >properties>add (add to right)

Set to the following properties:

Step 1:

Local monitoring port (listener port number): 9876, randomly set a 4-bit port number, a will be through the form of http://127.0.0.1:9876 access

Host name (the server to listen to, such as www.baidu.com): 127.0.0.1– listens for native IP because the computer has released a webservice. It can also be any host.

Port (the ports of the target server to listen to): 6666-Because we released the WebService as Http://127.0.0.1:6666/helloworld so, 6666 is the port number that needs listening.

Type (types of listening):

--TCP/IP: The next request will continue to be accessed using the original address, such as user input: HTTP://127.0.0.1:9876/HELLOWORLD?WSDL will now return the WSDL service access address to the previous.

--HTTP: The next request will continue to be accessed using the destination address. such as user input: HTTP://127.0.0.1:9876/HELLOWORLD?WSDL will use Http://127.0.0.1:6666/helloworld to access the Sayhi method when the method is requested. This way will no longer be represented. Because it's not the port number you're listening to.

At the listening type, we choose TCP/IP.

Students are advised to set both ways, and then by typing in the address bar: HTTP://127.0.0.1:9876/HELLOWORLD?WSDL, in the returned WSDL file

View: <soap:address location= "http: ..."/> address changes.

Time Out: Set access to unsuccessful connection times, to remain 0, that is, not set.
After setting, click OK to press the twist, and then point to the right of the Start button, listening has been started.

Step 2:

Configure the WSDL URL as: http://127.0.0.1:9876/helloworld?wsdl on the webservice of MyEclipse, and note that the port of MYECLIPSETCP/IP Monitor is used. Instead of going directly to our published HTTP://127.0.0.1:6666/HELLOWORLD?WSDL

Request the Sayhi method on the Webserviceexplorer, pass parameters, and view HTTP header information and the XML information sent and returned.

Whether it is MyEclipse WebService explorer,httpwatch, or tcp/ipmonitor are some auxiliary tools. Although not useful for writing code, it helps me to monitor the problem and discover the problem. Better able to adjust or improve the problem of discovering code from the use of tools.

What is defined within the WSDL.

Wsdl–webservice Description Language (ws description Language)

It mainly defines three aspects of the problem:

What? That is what the service is.

(Porttype,types,message)

How do I invoke a service?

Describes how the service is invoked through the binding element: Soap,soap12,post,get.

Where? Where to invoke the service.

service element, soap:address.

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.