ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help needed to create sample webservice

Post new topic  Reply to topic Goto page Previous  1, 2
 Help needed to create sample webservice « View previous topic :: View next topic » 
Author Message
ktg
PostPosted: Mon Jun 05, 2006 3:15 am    Post subject: Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

<Duplicate post>
Sorry


Last edited by ktg on Mon Jun 05, 2006 3:28 am; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
ktg
PostPosted: Mon Jun 05, 2006 3:23 am    Post subject: Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

I used nettool - http client.

In the left most pop down menu, I selected 'post' and typed http://200.200.100.93:7080/http_nodes in url box,

In the editable pane, I gave my html code:

Code:

<form method="post" action="http://200.200.100.93:7080/http_nodes">
   <table border="0">
      <tr>
         <th scope="row">
            <label for="account">Account:</label>
         </th>
         <td>
            <input type="text" name="account" id="account">
         </td>
      </tr>
      <tr>
         <td> </td>
         <td><input type="submit" name="Log On" ></td>
      </tr>
   </table>
</form>


Then I sent It. I am getting parsing error @ http input node itself!.... Actually, when this code is stored in a html page, we will get a text box to fill account info. In net tool it's not possible..... What to do?

When I tried calling from html page, it is also giving parsing error at http input node itself. Through nettool, the xmlns folder wont be empty... but through html, i won't get anything in xmlns folder .... what to do.

I know I need to change my esql code to process the html request. But before that there should not be any problem at http input node know?

Please, help
Back to top
View user's profile Send private message AIM Address
elvis_gn
PostPosted: Mon Jun 05, 2006 4:44 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi alpan,

Is the code you pasted above, the code that you are sending through the Nettool ? If it is, it is a simple XML but not a SOAP message...

Your message should look something like this



Code:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:c="http://www.brokersamplewshost.ibm.com"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <c:IA81CONFIN>
         <MessageId>IA81CONF</MessageId>
         <OrderNumber>ON4002</OrderNumber>
         <ItemReference>IY4003</ItemReference>
         <ItemQuantity>4</ItemQuantity>
         <CustomerNumber>CY4004</CustomerNumber>
      </c:IA81CONFIN>
   </soapenv:Body>
</soapenv:Envelope>


You can change the Body of the messag with whatever data you are trying to send...

Regards.
Back to top
View user's profile Send private message Send e-mail
ktg
PostPosted: Mon Jun 05, 2006 9:56 pm    Post subject: Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

Elvis,

"thanks a lot" for your kind reply. I tried with the SOAP message you have given above and changed my esql just to extract message id.
My esql code:
Code:
CREATE COMPUTE MODULE web_service_Compute
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN      
       DECLARE soapenv NAMESPACE 'http://schemas.xmlsoap.org/soap/envelope/' ;
       DECLARE xsi NAMESPACE 'http://www.w3.org/2001/XMLSchema-instance' ;
       DECLARE c NAMESPACE 'http://www.brokersamplewshost.ibm.com';
       
       CALL CopyMessageHeaders();
       
       SET OutputRoot.Properties.MessageFormat = 'xmlns';       
       SET OutputRoot.XMLNS.soapenv:Envelope.soapenv:Body.c:IA81CONFIN.MessageId = InputRoot.XMLNS.soapenv:Envelope.soapenv:Body.c:IA81CONFIN.MessageId;
        -- SET OutputRoot.XML.Greeting = 'Hello World';      
      -- CALL CopyEntireMessage();      
      RETURN TRUE;
   END;

   CREATE PROCEDURE CopyMessageHeaders() BEGIN
      DECLARE I INTEGER 1;
      DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
      WHILE I < J DO
         SET OutputRoot.*[I] = InputRoot.*[I];
         SET I = I + 1;
      END WHILE;
   END;

   CREATE PROCEDURE CopyEntireMessage() BEGIN
      SET OutputRoot = InputRoot;
   END;
END MODULE;


I am getting output as expected in nettool
Code:
<NS1:Envelope xmlns:NS1="http://schemas.xmlsoap.org/soap/envelope/"><NS1:Body><NS2:IA81CONFIN xmlns:NS2="http://www.brokersamplewshost.ibm.com"><MessageId>IA81CONF</MessageId></NS2:IA81CONFIN></NS1:Body></NS1:Envelope><


I had wrong perception that http node means we should use browser to play with them (as we type http://** in the address bar). So, I was struggling with html coding and all. But, now it seems that is wrong. WBIMB http nodes wont process html requests. Am I right now?

One more thing in info center under "Web Services example messages" topic,
there is a sample request message:
Code:

POST /greenpages/servlet/rpcrouter HTTP/1.0
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: 520
SOAP Action: ""
Cookie: JSESSIONID=0000B5OSLFIUDMQZFAUXKHD5ZDQ:-1

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schema.xmlsoap.org.soap/envelope/"
                   xmlns:xsi="http://www.w3/2001/XMLSchema-instance"
                   xmlns:xsd="http://www.w3/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:getUserByName xmlns:ns1="http://tempuri.org/imb.GreenPages"
                   SOAP-ENV:encodingStyle="http:/schemas.xmlsoap.org/soap/encoding/">
<nameField xsl:type="xsd:string">bloggs, joe</nameField>
</ns1:getUserByName>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Why it is also giving error at http input node or is it a html code to be processed by webserver other than wbimb webservice?
Do we need to hard code namespaces as I have done or is there any way to extract the same from input messsage itself?
Back to top
View user's profile Send private message AIM Address
ktg
PostPosted: Mon Jun 05, 2006 10:01 pm    Post subject: Reply with quote

Centurion

Joined: 09 Jan 2006
Posts: 138
Location: India

Now, how to link my webservice with webserver like tomcat? Could any one of you pl. give some info regarding this?
Back to top
View user's profile Send private message AIM Address
Vitor
PostPosted: Tue Jun 06, 2006 12:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

alpan wrote:
Now, how to link my webservice with webserver like tomcat? Could any one of you pl. give some info regarding this?


Not exactly on topic for this forum, but you should start here:

http://tomcat.apache.org/tomcat-5.5-doc/proxy-howto.html

This describes how to pass requests from the Apache web server through to Tomcat.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Help needed to create sample webservice
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.