cancel
Showing results for 
Search instead for 
Did you mean: 

Soap Channel started but inactive

Former Member
0 Kudos

Hello, All,

I created a SOAP-XI-SAP scenario.When I actually send my message, it did nothing. I checked communication channel monitoring. It says "Channel started but inactive". I checked all the configuration and found no error. I used HttpURLConnection to post soap message to XI through SOAP and I did not caught any error (exceptions). Could anyone give me some ideas? Any usful answers will be awarded. Thanks!

Meiying

Accepted Solutions (0)

Answers (5)

Answers (5)

moorthy
Active Contributor
0 Kudos

Hi,

This blog may help u-

/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi

if you are posting the payload dierctly into Integration Engine Pipeline, then no need of SOAP sender adapter, you can directly post via http client code.

hope this helps,

rgds,

moorthy

Former Member
0 Kudos

Hi, Krishna,

Thanks for the response! I know you have been posted a lots of good answers on my previous questions.

Can you please tell how can I directly post via http client code to XI, and don't need SOAP adapter? Thanks.

Meiying

Former Member
0 Kudos

Hi,

Are you keeping any xml tags like <?xml version="1.0" encoding="UTF-8" ?> before the below mentioned payload..if you are keeping it remove it and send it once again.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:n1="http://www.w3.org/2001/XMLSchema-instance" n1:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ C:\sample.xsd">

<SOAP-ENV:Body>

<ns1:MeiyingTest_mt xmlns:ns1="http://olemiss.edu/XI/MEIYINGTEST">

<empid school="OLEMISS">1</empid>

<emp.name>M</emp.name>

<empage>7</empage>

<flag>Y</flag>

</ns1:MeiyingTest_mt>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Amaresh

Former Member
0 Kudos

Hi, Amaresh,

No, those are all I have in the xml file.

Meiying

Former Member
0 Kudos

Hi,

How you are sending the payload... can you post the sample data the XML file which you are sending...so that i may be figure it ..

Former Member
0 Kudos

Yes. Sure.

Here is my sample XML file:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:n1="http://www.w3.org/2001/XMLSchema-instance" n1:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ C:sample.xsd">
	<SOAP-ENV:Body>
		<ns1:MeiyingTest_mt xmlns:ns1="http://olemiss.edu/XI/MEIYINGTEST">
			<empid school="OLEMISS">1</empid>
			<emp.name>M</emp.name>
			<empage>7</empage>
			<flag>Y</flag>
		</ns1:MeiyingTest_mt>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Here is my sample Java program to send that XML file to XI through SOAP adapter.

public class testMessage {

		   public static void main(String[] args) {
			
	        String SOAPUrl      = 
		        	"http://testpid.edu:51500/XISOAPAdapter/MessageServlet"
		        	+ "?channel=:FaDisb:MeiyingTestSoap";
		    String xmlFile2Send = "c:/sample.xml";
		  String SOAPAction = "";
		        if (args.length  > 2) 
						SOAPAction = args[2];
				
		        try {
		        // Create the connection where we're going to send the file.
		        URL url = new URL(SOAPUrl);
		        URLConnection connection = url.openConnection();
		        HttpURLConnection httpConn = (HttpURLConnection) connection;
		       	        
		        // Open the input file. After we copy it to a byte array, we can see
		        // how big it is so that we can set the HTTP Cotent-Length
		        // property. (See complete e-mail below for more on this.)

		        FileInputStream fin = new FileInputStream(xmlFile2Send);

		        ByteArrayOutputStream bout = new ByteArrayOutputStream();
		    
		        // Copy the SOAP file to the open connection.
		        copy(fin,bout);
		        fin.close();

		        
		        byte[] b = bout.toByteArray();
		        
		
		        // Set the appropriate HTTP parameters.
		        httpConn.setRequestProperty( "Content-Length",
		                                     String.valueOf( b.length ) );
		        httpConn.setRequestProperty("Content-Type","text/xml; charset=utf-8");
				  httpConn.setRequestProperty("SOAPAction",SOAPAction);
		        httpConn.setRequestMethod( "POST" );
		        httpConn.setDoOutput(true);
		      
		        // Everything's set up; send the XML that was read in to b.
		        OutputStream out = httpConn.getOutputStream();
		        out.write( b );    
		        out.close();
		  
		   }catch (MalformedURLException ex) {
		            error ("Bad URL");}
		        
		        catch (UnknownServiceException ex) {
		            error ("UnknownServiceException occurred.");
		          } catch (IOException ex) {
		            error ("IOException occurred.");
		          }

	

		  // copy method from From E.R. Harold's book "Java I/O"
		  public static void copy(InputStream in, OutputStream out) 
		   throws IOException {

		    // do not allow other threads to read from the
		    // input or write to the output while copying is
		    // taking place

		    synchronized (in) {
		      synchronized (out) {

		        byte[] buffer = new byte[256];
		        while (true) {
		          int bytesRead = in.read(buffer);
		          if (bytesRead == -1) break;
		          out.write(buffer, 0, bytesRead);
		        }
		      }
		    }
		  }
		  public static void error (String s) {
			    System.out.println (s);
			    System.exit (1);
			  }


	}

But it seems nothing been sent out and I did not get error (exeption). Thanks for look at it.

Meiying

Former Member
0 Kudos

Hi,

If you are not using WSDL, then You can use HTTP Client, where you can send the message, without WSDL to the R/3...and after sending the payload message through it you can test in the message monitoring to figure out the exact problem

Amaresh

Former Member
0 Kudos

Hi, Amaresh,

I did user HTTP to send a message. But in the message monitoring, it says no message processed.

Former Member
0 Kudos

Yang,

Can you download any SOAP client like SOAPScope or Altova XML SPY etc and send the request to server.

I think your WSDL is having some problem. So it is the reason why it is not coming into XI.

---Satish

Former Member
0 Kudos

Hi, Satish,

Thank you very much for the quick response. But I don't use WSDL to send message. I use direct URL ("http://testpid.olemiss.edu:51500/XISOAPAdapter/MessageServlet"

+ "?channel=:FaDisb:MeiyingTestSoap) and HttpURLConnection to send out a XML file (SOAP message) to XI. My java client code is something like this:

URL url = new URL(SOAPUrl);

URLConnection connection = url.openConnection();

HttpURLConnection httpConn = (HttpURLConnection) connection;

httpConn.setRequestMethod( "POST" );

httpConn.setDoOutput(true);

OutputStream out = httpConn.getOutputStream();

out.write( b );

out.close();

Thanks!

Meiying

Former Member
0 Kudos

Hi Meiying,

How are you formulating the soap message?

In XI search any messages that flowed through adapter engine , please check this in message monitoring of the RWB...and search for messages in adapter engine...

see if there were any errors listed there...

Thanks.

Former Member
0 Kudos

Hi, Deepu,

I checked. No message flowed through. Thanks for the answer.

Meiying

Former Member
0 Kudos

Is there any body can help me on this issue? Thanks

meiying