Solved

Trying to access the Web services

Posted on 2010-11-17
36
2,033 Views
Last Modified: 2013-11-24
We have a WSDL running on server at http://218.170.152.125:8081/soap/servlet/rpc. We want to call the method authenticate in python with the following code.
---
import xmlrpclib

# Create an object to represent our server.
from xmlrpclib import ServerProxy
url='http://218.170.152.125:8081/soap/servlet/rpcrouter'
server =  xmlrpclib.ServerProxy(url)
print server
print "Authenticate Method"
server.service.authenticate('test8888','clerical_test@atp2.com','1','2','192.168.4.58')

However, I am getting the following response while I run it:
Traceback (most recent call last):
  File "C:\Documents and Settings\rgupta\My Documents\python\second_example.py",
 line 13, in <module>
    res1 = server.service.authenticate('test8888','clerical_test@atp2.com','1','
2','192.168.4.58')
  File "C:\Python27\lib\xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "C:\Python27\lib\xmlrpclib.py", line 1570, in __request
    verbose=self.__verbose
  File "C:\Python27\lib\xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Python27\lib\xmlrpclib.py", line 1312, in single_request
    response.msg,
xmlrpclib.ProtocolError: <ProtocolError for 208.70.152.125:8081/soap/servlet/rpc
router: 400 Error unmarshalling envelope: Root element of a SOAP message must be
: 'http://schemas.xmlsoap.org/soap/envelope/:Envelope'.>

What can I do that to fix the issue???
0
Comment
Question by:totaram
  • 17
  • 16
36 Comments
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34193970
It is expecting a SOAP message.  What message are you sending to it?

Can you attach the XML of the message that is being sent to it.
0
 

Author Comment

by:totaram
ID: 34201642
How do I send a SOAP message, can you please give an example. Also, how does one attach XML of message that is being sent. XML code is attached below. (Being a novice in the field, please excuse my ignorance).
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                <SOAP-ENV:Body>
                                <ns1:authenticate xmlns:ns1="urn:AgilityAPI-Webserver" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">
                                                <ParameterInp>

            <authenticateInp>
               <authData>test</authData>
               <userId>test@ap.com</userId>
               <authType>1</authType>
               <sessionId>2</sessionId>
               <ipAddress>192.168.4.58</ipAddress>
            </authenticateInp>
                                                        </ParameterInp>
                                </ns1:authenticate>
                </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
0
 
LVL 41

Expert Comment

by:HonorGod
ID: 34201691
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34202029
The message XML you have attached is a SOAP message.  

However, it would seem that the server is having difficulty with the message, or the response coming back from the server is at issue.

Download soapui http://sourceforge.net/projects/soapui/
Create a new soapui project
Add the WSDL from your server
Create a mock service for that response
Change your ServerProxy in your client to point to the mock service instead
See what is sent by your client

If that looks like the request you sent me then all is good with your client

With soapui now test the server
Add the soap xml you sent to the request part of soapui you created earlier
Send the request to your server
See what response you get back
0
 

Author Comment

by:totaram
ID: 34202349
Sweetfa2;
You have the pulse of the matter, pl don't go away. I have tested the whole code with soapui, and it works in SOAPUI. My issue is when I try to write a client (instead of SOAPUI), it doesn't seem to work. I am really trying to replicate everything in python in a much strip down fashion.

When I run SOAPUI, I get the response as following:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <SOAP-ENV:Body>
      <ns1:authenticateResponse SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml" xmlns:ns1="urn:AgilityAPI-Webserver">
         <return>
            <ResultData>
               <Name>AccountNumber</Name>
               <Value>114282</Value>
            </ResultData>
         </return>
      </ns1:authenticateResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


Also, I have changed the client code from above, it is as follows:
-----
import re
import xmlrpclib
import suds

# Create an object to represent our server.
from suds.client import Client
url='http://208.70.152.125:8081/soap/servlet/rpcrouter'
wsdl_file="http://208.70.152.125:8081/soap/servlet/rpcrouter?agilityPrepaidAPIs.wsdl"
client = suds.client.Client(wsdl_file,location=url,cache=None)
print client

print "Authenticate Method"
client.service.authenticate('test8888','clerical_test@atp2.com','1','2','192.168.4.58')
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34202778
You don't say what happens with your suds approach.

Also you don't capture the result from your authenticate request.
0
 

Author Comment

by:totaram
ID: 34206193
Suds approach could not recognise the 'services' method and is at that point now. Please see the output for the above code. There can be two options: 1. I am not sure if there is a method called 'services', but used it thinking that it is that way with WSDL. 2. Do I need to somehow create a stub of the authenticate XML at client side, so that the outgoing call knows about it. Please advice, feeling lost :-)

---

Suds ( https://fedorahosted.org/suds/ )  version: 0.4 GA  build: R699-20100913
Authenticate Method
Traceback (most recent call last):
  File "C:\Documents and Settings\rgupta\My Documents\python\test_server.py", li
ne 13, in <module>
    client.service.authenticate('test8888','clerical_test@atp2.com','1','2','192
.168.4.58')
  File "C:\Python27\lib\suds\client.py", line 296, in __getattr__
    port = self.__find(0)
  File "C:\Python27\lib\suds\client.py", line 331, in __find
    raise Exception, 'No services defined'
Exception: No services defined
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34207544
I think you have exceeded your points quota at this point.
0
 

Author Comment

by:totaram
ID: 34208030
I increase the points to 500.
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34208659
Try

client = suds.client.Client(wsdl_file,cache=None)

I am suspecting an issue with the rpcrouter part.
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34208660
Can you post your wsdl as well.  That might give some clues.
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34209767
Also, what does your
print client
output?
0
 

Author Comment

by:totaram
ID: 34213523
The print output is included in mail above, it sometype of traceback.

By WSDL file, do you mean the XML?? Except XML APIs, I do not have access to anything on server.
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34213913
http://208.70.152.125:8081/soap/servlet/rpcrouter?agilityPrepaidAPIs.wsdl

Open this link in a browser.  Right click on the page, select view source, and copy the contents to this page.
0
 

Author Comment

by:totaram
ID: 34214207
Sweetfa2..
Which one is more appropriate (Please check the 3 web screens I get when I open 3 URLs)
1. Upon executing http://208.70.152.125:8081/soap/servlet/rpcrouter?agilityPrepaidAPIs.wsdl, I get:

SOAP RPC Router
Sorry, I don't speak via HTTP GET- you have to use HTTP POST to talk to me.
---
2. Upon executing http://208.70.152.125:8081/soap/, I get the following screen,

                                                       Apache-SOAP
Hello! Welcome to Apache-SOAP.

What do you want to do today?

Run the admin client
Visit the SOAP RPC router URL for this SOAP server
---
3. Upon executing http://208.70.152.125:8081/, I get the following screen (A fullfledged screen to login),
 
Agility Network Services Platform TM  
Login  
 
Sign-In Name  [BOX]
Password  [BOX]
Language English(US)   [BOX]

--
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34214374


If you used soapui to communicate with it check your http log and see if it was using a GET to load the WSDL or if it used another mechanism.  Normally GET is sufficient, but maybe SOAP knows how to fetch it better.

However, I suspect that may be the reason that your suds client is not working because if it cannot access the wsdl it cannot determine what services are available on the server.  It should auto-configure the services based on the wsdl content.  As it appears that no content is returned via the wsdl address then no services can be assigned.
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34214444
At best the contents of the soapui http log after you do add the wsdl url to a project will be sufficient for me to work out what is happening.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:totaram
ID: 34214761
Here is the HTTP log from SOAPUI, when I run the authenticate method from SOAPUI, thanks again from spending your Thanksgiving holiday on this problem:
----
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "POST /soap/servlet/rpcrouter HTTP/1.1[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "SOAPAction: "authenticate"[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "Host: 208.70.152.125:8081[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "Content-Length: 901[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "                <SOAP-ENV:Body>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "                                <ns1:authenticate xmlns:ns1="urn:AgilityAPI-Webserver" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml"> [\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "                                                <ParameterInp> [\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "            <authenticateInp>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "               <authData>test8888</authData>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "               <userId>clerical_test@atp2.com</userId>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "               <authType>1</authType>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "               <sessionId>2</sessionId>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "               <ipAddress>192.168.4.58</ipAddress>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "            </authenticateInp>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "                                                        </ParameterInp> [\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "                                </ns1:authenticate> [\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "                </SOAP-ENV:Body>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:>> "</SOAP-ENV:Envelope>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "Server: Apache-Coyote/1.1[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "Set-Cookie: JSESSIONID=DA96DD087DC54B9EAE7122AC92AB9AA0; Path=/soap[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "Content-Type: text/xml;charset=utf-8[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "Content-Length: 524[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "Date: Thu, 25 Nov 2010 23:34:45 GMT[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "<?xml version='1.0' encoding='UTF-8'?>[\r][\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "<SOAP-ENV:Body>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "<ns1:authenticateResponse xmlns:ns1="urn:AgilityAPI-Webserver" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "<return>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "<ResultData><Name>AccountNumber</Name><Value>114282</Value></ResultData>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "</return>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "</ns1:authenticateResponse>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "</SOAP-ENV:Body>[\n]"
Thu Nov 25 17:34:43 CST 2010:DEBUG:<< "</SOAP-ENV:Envelope>[\n]"
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34214785
Can I get you to reload the wsdl in soap, and then give me the log.

The log you posted is of the request going through.  I need to see how it handled the original wsdl load.
0
 

Author Comment

by:totaram
ID: 34214849
I brought down the old session and launch new SOAPUI session, is that reload enough?
Here is the log after runniong authenticate().. Let me know if that is not what you are looking for...
--
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "POST /soap/servlet/rpcrouter HTTP/1.1[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "SOAPAction: "authenticate"[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "Host: 208.70.152.125:8081[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "Content-Length: 901[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "[\r][\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "                <SOAP-ENV:Body>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "                                <ns1:authenticate xmlns:ns1="urn:AgilityAPI-Webserver" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml"> [\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "                                                <ParameterInp> [\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "            <authenticateInp>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "               <authData>test8888</authData>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "               <userId>clerical_test@atp2.com</userId>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "               <authType>1</authType>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "               <sessionId>2</sessionId>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "               <ipAddress>192.168.4.58</ipAddress>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "            </authenticateInp>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "                                                        </ParameterInp> [\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "                                </ns1:authenticate> [\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "                </SOAP-ENV:Body>[\n]"
Thu Nov 25 18:08:20 CST 2010:DEBUG:>> "</SOAP-ENV:Envelope>[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "Server: Apache-Coyote/1.1[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "Set-Cookie: JSESSIONID=754CC3D046495C940FC2121C9E444BB8; Path=/soap[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "Content-Type: text/xml;charset=utf-8[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "Content-Length: 524[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "Date: Fri, 26 Nov 2010 00:08:22 GMT[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "<?xml version='1.0' encoding='UTF-8'?>[\r][\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "<SOAP-ENV:Body>[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "<ns1:authenticateResponse xmlns:ns1="urn:AgilityAPI-Webserver" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "<return>[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "<ResultData><Name>AccountNumber</Name><Value>114282</Value></ResultData>[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "</return>[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "</ns1:authenticateResponse>[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "</SOAP-ENV:Body>[\n]"
Thu Nov 25 18:08:21 CST 2010:DEBUG:<< "</SOAP-ENV:Envelope>[\n]"
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34214860
No you need to refresh the wsdl.

Right click on the binding (the first level below the project) and select update definition
0
 

Author Comment

by:totaram
ID: 34214886
After updating the defns:

HTTP Logs:
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "POST /soap/servlet/rpcrouter HTTP/1.1[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "SOAPAction: "authenticate"[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "Host: 208.70.152.125:8081[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "Content-Length: 901[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "                <SOAP-ENV:Body>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "                                <ns1:authenticate xmlns:ns1="urn:AgilityAPI-Webserver" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml"> [\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "                                                <ParameterInp> [\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "            <authenticateInp>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "               <authData>test8888</authData>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "               <userId>clerical_test@atp2.com</userId>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "               <authType>1</authType>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "               <sessionId>2</sessionId>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "               <ipAddress>192.168.4.58</ipAddress>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "            </authenticateInp>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "                                                        </ParameterInp> [\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "                                </ns1:authenticate> [\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "                </SOAP-ENV:Body>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:>> "</SOAP-ENV:Envelope>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "Server: Apache-Coyote/1.1[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "Set-Cookie: JSESSIONID=2C757B7B4224185B62AB5F549E26C158; Path=/soap[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "Content-Type: text/xml;charset=utf-8[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "Content-Length: 524[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "Date: Fri, 26 Nov 2010 00:31:41 GMT[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "<?xml version='1.0' encoding='UTF-8'?>[\r][\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "<SOAP-ENV:Body>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "<ns1:authenticateResponse xmlns:ns1="urn:AgilityAPI-Webserver" SOAP-ENV:encodingStyle="http://xml.apache.org/xml-soap/literalxml">[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "<return>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "<ResultData><Name>AccountNumber</Name><Value>114282</Value></ResultData>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "</return>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "</ns1:authenticateResponse>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "</SOAP-ENV:Body>[\n]"
Thu Nov 25 18:31:41 CST 2010:DEBUG:<< "</SOAP-ENV:Envelope>[\n]"
----
SOAPUI Logs:
Thu Nov 25 18:29:33 CST 2010:INFO:initialized soapui-settings from [C:\Documents and Settings\rgupta\soapui-settings.xml]
Thu Nov 25 18:29:34 CST 2010:INFO:Loading workspace from [C:\Documents and Settings\rgupta\default-soapui-workspace.xml]
Thu Nov 25 18:29:34 CST 2010:INFO:Loaded project from [file:C:/Documents and Settings/rgupta/My Documents/Java/New Folder/Agility-soapui-project.xml]
Thu Nov 25 18:29:39 CST 2010:INFO:Used java version: 1.6.0_21
Scheduling garbage collection every 60 seconds
The cajo server is running on localhost:1198/soapuiIntegration
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/soapEnvelope.xsd with targetNamespace http://schemas.xmlsoap.org/soap/envelope/
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/soapEncoding.xsd with targetNamespace http://schemas.xmlsoap.org/soap/encoding/
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/soapEnvelope12.xsd with targetNamespace http://www.w3.org/2003/05/soap-envelope
Thu Nov 25 18:30:10 CST 2010:INFO:Added default schema from file:/C:/Program%20Files/eviware/soapUI-3.6/bin/soapui-3.6.jar!/com/eviware/soapui/resources/xsds/soapEncoding12.xsd with targetNamespace http://www.w3.org/2003/05/soap-encoding
Thu Nov 25 18:30:10 CST 2010:DEBUG:Loading Definition...
Thu Nov 25 18:30:10 CST 2010:DEBUG:Loading WSDL: file:/C:/Documents%20and%20Settings/rgupta/My%20Documents/Java/New%20Folder/agilityPrepaidAPIs.wsdl
Thu Nov 25 18:30:10 CST 2010:DEBUG:Returning baseInputSource [file:/C:/Documents%20and%20Settings/rgupta/My%20Documents/Java/New%20Folder/agilityPrepaidAPIs.wsdl]
Thu Nov 25 18:30:10 CST 2010:INFO:Loading schema types from [file:/C:/Documents%20and%20Settings/rgupta/My%20Documents/Java/New%20Folder/agilityPrepaidAPIs.wsdl]
Thu Nov 25 18:30:10 CST 2010:INFO:Getting schema file:/C:/Documents%20and%20Settings/rgupta/My%20Documents/Java/New%20Folder/agilityPrepaidAPIs.wsdl
Thu Nov 25 18:30:11 CST 2010:DEBUG:Loaded Definition: ok
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [authenticate]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [reAuthenticate]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [logout]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [registerCliToProduct]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setPinStatusSerialRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setPinStatusLotIdsRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setPinStatusSerialList]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [debitAmountSerialRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [debitAmountLotIdRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [debitAmountSerialList]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [creditAmountSerialRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [creditAmountLotIdRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [creditAmountSerialList]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setBalanceSerialRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setBalanceLotIdRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setBalanceSerialList]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setExpiryDateSerialRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setExpiryDateLotIdRange]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getAccessNumbersForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getOfferDetailsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getUserAccountDetails]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getRatePlanDetailsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getProductDetailsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getCallingCardDetailsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getSpeedDialsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getRegisteredClisForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getUserPhoneNumberDetailsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getCDRDetailsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getPurchasableProductsForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [setPreferredLangForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [changeAccountPassword]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [registerClisWithAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [saveSpeeDialsWithAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [rechargeCardForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [purchaseCardForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [modifyUserInfoForAccount]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [passwordRecoverySupport]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [createUserAccountAndSubscribeService]
Thu Nov 25 18:30:11 CST 2010:INFO:Synchronizing existing operation [getDeactivationReportSummary]
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34214958
Change your client to this and see what happens

url='http://208.70.152.125:8081/soap/servlet/rpcrouter'
wsdl_file="C:/Documents%20and%20Settings/rgupta/My%20Documents/Java/New%20Folder/agilityPrepaidAPIs.wsdl"
client = suds.client.Client(wsdl_file,location=url,cache=None)
print client


If it doesn't work, can you post the wsdl file at
C:/Documents%20and%20Settings/rgupta/My%20Documents/Java/New%20Folder/agilityPrepaidAPIs.wsdl
0
 

Author Comment

by:totaram
ID: 34215315
The wsdl_location change did not work, following is the output received:
THe prepaid API wsdl is located below:

Traceback (most recent call last):
  File "C:\Documents and Settings\rgupta\My Documents\python\test_server.py", li
ne 11, in <module>
    client = suds.client.Client(wsdl_file,location=url,cache=None)
  File "C:\Python27\lib\suds\client.py", line 112, in __init__
    self.wsdl = reader.open(url)
  File "C:\Python27\lib\suds\reader.py", line 152, in open
    d = self.fn(url, self.options)
  File "C:\Python27\lib\suds\wsdl.py", line 136, in __init__
    d = reader.open(url)
  File "C:\Python27\lib\suds\reader.py", line 79, in open
    d = self.download(url)
  File "C:\Python27\lib\suds\reader.py", line 95, in download
    fp = self.options.transport.open(Request(url))
  File "C:\Python27\lib\suds\transport\https.py", line 60, in open
    return  HttpTransport.open(self, request)
  File "C:\Python27\lib\suds\transport\http.py", line 62, in open
    return self.u2open(u2request)
  File "C:\Python27\lib\suds\transport\http.py", line 118, in u2open
    return url.open(u2request, timeout=tm)
  File "C:\Python27\lib\urllib2.py", line 391, in open
    response = self._open(req, data)
  File "C:\Python27\lib\urllib2.py", line 414, in _open
    'unknown_open', req)
  File "C:\Python27\lib\urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 1206, in unknown_open
    raise URLError('unknown url type: %s' % type)
urllib2.URLError: <urlopen error unknown url type: c> agilityPrepaidAPIs.txt agilityPrepaidAPIs.txt
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34223290
Two things to try..

The first is to remove the %20 in the filename to your wsdl and replace them with spaces.  Your attempt is unable to find the file which is expected with %20 in the pathname.

The second is to change the location in your request to "http://SPSIServerIP:8081/soap/servlet/rpcrouter"
0
 
LVL 17

Accepted Solution

by:
sweetfa2 earned 500 total points
ID: 34223304
And a third option is to use this location

http://spsiserverip:8081/soap/servlet/rpcrouter/agilityAPIService
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34223305
With option1 try it with and without the location variable set.
0
 

Author Comment

by:totaram
ID: 34227800
HI Sweetfa2;
First of all thank you so much for provide much needed advice, you have understood the issue well.
I tried all the combinations, but somehow it points to error in reading the file. I have a few basic questions and would appreciate if you shed some light on them.
1. Since soap and rpcrouter are older ways of communication between client and server, can there Incompatibikity between suds & rpcrouter that might be causing it? I see the error coming from C:\Python27\lib\urllib2.py.
2. My understanding was that WSDL reside on the server side, but we are pointing to wsdl on client side, is that ok ? Also, thne wsdl ref always has this "?" at the end, but we donot.
3.  I can't seem to ping spsiserverip so, location, so how can code reach that location?
4, http://spsiserverip:8081/<blah> on the web browser should open the API services, but it does not, should it not be that way?
0
 
LVL 17

Expert Comment

by:sweetfa2
ID: 34227827
Yes, it appears to be an error reading the wsdl file.  It also appears as if the services cannot be determined from your rpcrouter configuration.

1. I doubt it - it may actually be the pathname you are using for wsdl file.  You could try
wsdl_file="file://C:/Documents and Settings/rgupta/My Documents/Java/New Folder/agilityPrepaidAPIs.wsdl"

Open in new window

as the code you mention is actually trying to resolve an URL.  By prepending the path with file:// you are turning it into something a URL resolver can solve.

2. Normally the wsdl is provided by the server.  However the location of the wsdl is irrelevant as long as the client knows where to find it.  You can try it with the . and the ?.  It depends on your server on what works.  Try it in your browser with both and see if it doesn't give you a wsdl.  If it does, use that wsdl URL in your code.

3.  The SPIServerIP is the address that it is attempting to reach that is in the WSDL file that you provided.  If that is not the server then you must have received a copy of it from somewhere else.  Again - if you can get 2 to work then the file on your end becomes irrelevant.

4.  Yes it should, but the exact behaviour will depend on your server container.
0
 

Author Comment

by:totaram
ID: 34260290
Can you please keep this question active, as sweetfa2 has good understanding of the issue and I may need his expertise while testing.
0
 

Author Comment

by:totaram
ID: 34661203
To the admin;
Can you remove attached files, as they are confidential.
0
 

Author Comment

by:totaram
ID: 34706463
Please take out the attachments if possible.
0
 

Author Comment

by:totaram
ID: 34746490
Give me some time, I am still sorting the files. Will be done soon,.
0
 

Author Comment

by:totaram
ID: 34746778
1. Please include teh following attached file for present attachemt on 11/25/10 08:24 PM, ID: 34215315. Pl rename file as API_File. The second attachment can go, as it was twice attached by mistake.
2. For posting on 11/23/10 07:27 PM, ID: 34202349, pl change the url as: url='http://218.170.152.125:8081/soap/rpcrouter'
wsdl_file="http://218.71.152.152:8081/soap/servlet/rpcrouter?APIs.wsdl"
3. For posting on 11/27/10 02:17 PM, ID: 34223304, pl change AgilityAPI to API
4.For posting on 11/28/10 08:47 PM, ID: 34227827, please change ragupta to XYZ in the box.
 API-File.txt
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mapAB Challlenge 35 89
Popup window in I.E. 8 38
whm high memory usage in processes 7 38
How do i learn Story Board for IOS ? 3 18
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now