------ generated request -------------------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<request req_id="123">
<ind_mis_lookup>
<ssn>123-45-6789</ssn>
</ind_mis_lookup>
</request>
</soap:Body>
</soap:Envelope>
-------- expected request -------------------
<?xml version="1.0" encoding="UTF-8"?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header>
<wsse:Security
xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/04/secext">
<wsse:UsernameToken>
<wsse:Username>UN</wsse:Username>
<wsse:Password>PASSWORD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap-env:Header>
<soap-env:Body>
<request req_id="123">
<ind_mis_lookup>
<ssn>123-45-6789</ssn>
</ind_mis_lookup>
</request>
</soap-env:Body>
</soap-env:Envelope>
--------- code --------------
// .Net Soap Test
SoapConnection conn // Define SoapConnection
mislookup proxy_obj // Declare proxy
long ll_rc
// request vars
request_type request
ind_mis_lookup_type ind_mis_lookup
string ssn
string req_id
// response vars
response_type response
conn = create SoapConnection //Instantiated connection
ll_rc = conn.CreateInstance( proxy_obj, 'mislookup' )
ll_rc = conn.SetBasicAuthentication ('', 'UN', 'PASSWORD')
// set request variable
req_id = "123"
ssn = "123-45-6789"
ind_mis_lookup.ssn = ssn
request.req_id = req_id
request.ind_mis_lookup = ind_mis_lookup
TRY
response = proxy_obj.individualmislookup( request )
messagebox("Test", "req_id: " + response.req_id)
CATCH ( SoapException e )
MessageBox( "SOAP Exception", e.Getmessage() )
END TRY
DESTROY conn
"Josh Crawford" <mon...@hotmail.com> wrote in message
news:45b55010$1@forums-1-dub...
http://msdn2.microsoft.com/en-us/library/w67h0dw7.aspx
That's something added support for with the 10.5.1 MR.
On 22 Jan 2007 17:16:40 -0700, "Josh Crawford" <mon...@hotmail.com>
wrote:
>PB10.5 and using .Net engine.
>
>"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
>wrote in message news:45b55127$1@forums-1-dub...
"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:45b55127$1@forums-1-dub...
>
"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:u7tar2ls4dm5gjs1m...@4ax.com...
>In this web page
>http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc00357_1051/html/newfeat1051/CEGDCFJF.htm
>it talks about generating structures from the Web service's SOAP header
>class. Is this from the wsdl?
Yes.
>Is there any other documentation for this?
None that I know of.
"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:536jr25pnj6bdrohs...@4ax.com...
"Josh Crawford" <mon...@hotmail.com> wrote in message
news:45ba986c@forums-1-dub...
"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:45baad19$1@forums-1-dub...
http://developer.ebay.com/webservices/latest/eBaySvc.wsdl
On 30 Jan 2007 18:03:57 -0700, "Josh Crawford" <mon...@hotmail.com>
request_type request
ind_mis_lookup_type ind_mis_lookup
string ssn
string req_id
// header vars
security_type security
usernametoken_type usernametoken
// response vars
response_type response
conn = create SoapConnection //Instantiated connection
ll_rc = conn.CreateInstance( proxy_obj, 'mislookup' )
// set header vars
usernametoken.username = 'USER'
usernametoken.password = 'PASS'
security.usernametoken = usernametoken
// set request variable
req_id = "123"
ssn = "123-45-6789"
ind_mis_lookup.ssn = ssn
request.req_id = req_id
request.ind_mis_lookup = ind_mis_lookup
// set security
lb_rc = proxy_obj.setSecurity( security )
TRY
response = proxy_obj.individualmislookup( request )
messagebox("Test", "req_id: " + response.req_id)
CATCH ( SoapException e )
MessageBox( "SOAP Exception", e.Getmessage() )
END TRY
DESTROY conn
"Josh Crawford" <mon...@hotmail.com> wrote in message
news:45b92940@forums-1-dub...
<simpleType name="KommunenummerType">
<restriction base="string">
<maxLength value="4"/>
</restriction>
</simpleType>
<simpleType name="CprType">
<restriction base="string">
<maxLength value="10"/>
</restriction>
</simpleType>
The corresponding fields in the generated structures are named 'text' and
the datatypes are string arrays, which I find a little strange. I've tried
renaming the fields and changing the types to strings but with no success.
Did you find a solution to the problem?
Regards,
Christian Blanco Hilm.
"Josh Crawford" <mon...@hotmail.com> wrote in message
news:45c14bd8$1@forums-1-dub...
////////////////////////////////////
security.encodedmustunderstand = "0"
security.encodedmustunderstand12 = "0"
security.encodedrelay = "0"
////////////////////////////////////
"Christian Blanco Hilm" <chbh_r...@hotmail.com> wrote in message
news:45e599b7$1@forums-1-dub...
"Josh Crawford" <mon...@hotmail.com> wrote in message
news:45f96d5c$1@forums-1-dub...
<simpleType name="KommunenummerType">
<restriction base="string">
<maxLength value="4"/>
</restriction>
</simpleType>
<simpleType name="CprType">
<restriction base="string">
<maxLength value="10"/>
</restriction>
</simpleType>
For test purposes, I populate the two auto generated structures as follows:
//soap header structures
p_kommuneNummerType lstr_kommuneNummer
p_cprType lstr_cpr
//populate soap header structures
lstr_kommuneNummer.text[1] = "147"
lstr_kommuneNummer.mustunderstand = true
lstr_kommuneNummer.encodedmustunderstand = "0"
lstr_kommuneNummer.encodedmustunderstand12 = "0"
lstr_kommuneNummer.encodedrelay = "0"
lstr_cpr.text[1] = "9272727279"
lstr_cpr.mustunderstand = true
lstr_cpr.encodedmustunderstand = "0"
lstr_cpr.encodedmustunderstand12 = "0"
lstr_cpr.encodedrelay = "0"
I call the two auto generated set functions like this:
lws_pem.setCpr(lstr_cpr)
lws_pem.setKommunenummer(lstr_kommuneNummer)
When multiple set functions are called, it seems like the latest one is the
one which is used in the header.
When I call setKommunenummer first and setCpr second, the information
regarding 'Cpr' is correct, but 'Kommunenummer' is omitted from the
generated header. When I call setCpr first and setKommunenummer second, I
observe that the 'Kommunenummer' value 147 is inserted between the Cpr
header tags:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><cpr
soap:mustUnderstand="1"
xmlns="http://dk.acure.pem.security">147</cpr></soap:Header><soap:Body><GetMedicineCardStructure
xmlns="http://www.dkma.dk/homecare/xml.schema/2006.05.11"><PersonCivilRegistrationIdentifier
xmlns="http://rep.oio.dk/cpr.dk/xml/schemas/core/2005/03/18/">0404441019</PersonCivilRegistrationIdentifier></GetMedicineCardStructure></soap:Body></soap:Envelope>
I would expect something like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><cpr
soap:mustUnderstand="1"
xmlns="http://dk.acure.pem.security">0404441019</cpr><kommunenummer
soap:mustUnderstand="1"
xmlns="http://dk.acure.pem.security">147</kommunenummer></soap:Header><soap:Body><GetMedicineCardStructure
xmlns="http://www.dkma.dk/homecare/xml.schema/2006.05.11"><PersonCivilRegistrationIdentifier
xmlns="http://rep.oio.dk/cpr.dk/xml/schemas/core/2005/03/18/">0404441019</PersonCivilRegistrationIdentifier></GetMedicineCardStructure></soap:Body></soap:Envelope>
But I'm not able to get the 'Kommunenummer' tag into the SOAP header.
Is this the intended functionality or is it a bug?
Regards,
Christian Blanco Hilm.
On 21 Mar 2007 04:21:20 -0800, "Christian Blanco Hilm"
How do you do the auto generated set functions ?
Are they functions from PB, from the Web Service or you invented them to insert
some elements in the soap header ?
Thanks
Jose Rico
On 21 Mar 2007 04:21:20 -0800,
in sybase.public.powerbuilder.webservices
"Jose Rico" <jr...@e-infoauto.com> wrote in message
news:4641d37f@forums-1-dub...
"Christian Blanco Hilm" <chbh_r...@hotmail.com> wrote in message
news:464ab63c@forums-1-dub...
"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:464b33b8$1@forums-1-dub...
It looks like you cut and paste that WSDL out of the display in IE,
because there's a bunch of garbage embedded it in that IE usually
inserts when displaying a WSDL. How about attaching a version that
doesn't contain the garbage.
<service>
<name>findbook</name>
<serviceClass>Sever.IFindBook</serviceClass>
<implementationClass>Sever.FindBook</implementationClass>
<style>wrapped</style>
<use>literal</use>
<scope>application</scope>
<inHandlers>
<handler handlerClass="Sever.ValidateUserTokenHandler"/>
</inHandlers>
</service></beans>
//-----------------------------------------------
i'm using inHandlers property,but wsdl file is automatic to build.
Perhaps because it was pasted in as text, it also contains a lot of
line breaks in inappropriate places.
It also appears that the SoapAction attribute for your method has a
null reference, but that's perhaps not a critical error.
However, most likely the problem you have is that your web service
isn't including the wsse:security tags to indicate what custom headers
it's expecting. Without that information, the proxy generator had no
idea what to send, or that the web service is expecting anything:
http://www.theserverside.com/tt/articles/article.tss?l=WebServicesWSDL