Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using WS::Client with complex types

52 views
Skip to first unread message

yahalom

unread,
Dec 4, 2009, 5:42:01 AM12/4/09
to
I am trying to work with WS::Client. I parsed the wsdl successfully
(after removing non existing urls). The WSDL contains complex and
array types. When I try to work with the WSDL I get error. What am I
doing wrong.

package require WS::Client
::WS::Client::LoadParsedWsdl {
service {name TeamConnectorServiceService location http://test/services/TedtService}
targetNamespace {{tns1 http://test.com} {tns2 http://test.com}} types
{connectorAction {transportContainer {type TransportContainer comment
{}}} connectorActionResponse {connectorActionReturn {type
TransportContainer comment {}}} connectorActionAsync
{transportContainer {type TransportContainer comment {}}}
ArrayOf_tns1_Property {item {type Property() comment {}}}
ArrayOf_tns1_RoutingNode {item {type RoutingNode() comment {}}}
Property {name {type string comment {}} value {type string comment
{}}} RoutingNode {actionHandlerName {type string comment {}}
asyncRequest {type boolean comment {}} auditRequired {type boolean
comment {}} description {type string comment {}} endPointUrl {type
string comment {}} exceptionMessage {type string comment {}}
onFailureAction {type string comment {}} responseXML {type string
comment {}} returnControl {type boolean comment {}} status {type
string comment {}} teamNodeName {type string comment {}} timeout {type
int comment {}} xmlTransit {type boolean comment {}}}
TransportContainer {actionName {type string comment {}} errorCode
{type string comment {}} errorDescription {type string comment {}}
guid {type string comment {}} packetType {type string comment {}}
positionIndex {type int comment {}} properties {type
ArrayOf_tns1_Property comment {}} requestXML {type string comment {}}
routing {type ArrayOf_tns1_RoutingNode comment {}} routingNodeByIndex
{type RoutingNode() comment {}} subActionName {type string comment
{}}}} operList {connectorAction connectorActionAsync} operation
{connectorAction {style document/literal action {} soapRequestHeader
{{}} soapReplyHeader {{}} inputs connectorAction outputs
connectorActionResponse xns {}} connectorActionAsync {style document/
literal action {} soapRequestHeader {{}} soapReplyHeader {{}} inputs
connectorActionAsync outputs connectorActionAsyncResponse xns {}}}

}
set xml {<?xml version="1.0" encoding="UTF-8"?><Request>
<test>test</test>}

dict set routing actionHandlerName SaleAction
dict set routing asyncRequest null
dict set routing auditRequired null
dict set routing description null
dict set routing endPointUrl null
dict set routing exceptionMessage null
dict set routing onFailureAction null
dict set routing responseXML null
dict set routing returnControl null
dict set routing status null
dict set routing teamNodeName null
dict set routing teamNodeName null
dict set routing timeout 0

dict set tc actionName SaleAction
dict set tc errorCode null
dict set tc errorDescription null
dict set tc guid null
dict set tc packetType null
dict set tc positionIndex null
dict set tc properties null
dict set tc requestXML $xml
dict set tc routing $routing
dict set tc unbounded $routing
dict set tc subActionName ""

puts [::WS::Client::DoCall TeamConnectorServiceService connectorAction
[list connectorAction $tc ]]

I get this error:

key "xns" not known in dictionary
while executing
"dict get [::WS::Utils::GetServiceTypeDef Client $serviceName
$msgType] xns"
(procedure "buildDocLiteralCallquery" line 48)
invoked from within
"buildDocLiteralCallquery $serviceName $operationName $url $argList"
(procedure "buildCallquery" line 10)
invoked from within
"buildCallquery $serviceName $operationName $url $argList"
(procedure "::WS::Client::DoCall" line 13)
invoked from within
"::WS::Client::DoCall TeamConnectorServiceService connectorAction
[list connectorAction $tc ]"
invoked from within
"if {1} {
::WS::Client::LoadParsedWsdl {
service {name TeamConnectorServiceService location http://test/services/test..."
(file "test.tcl" line 2)


Gerald W. Lester

unread,
Dec 4, 2009, 1:30:19 PM12/4/09
to
I'll try to take a look at what is going on ASAP (but this is a *VERY* busy
time of year for me so no promises on when that will be).


--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+

Patrick

unread,
Dec 18, 2009, 5:15:12 PM12/18/09
to
Did you ever get this figured out? I am having a similar problem with
an argument being an array of strings.
Patrick

drsc...@gmail.com

unread,
Dec 18, 2009, 5:43:44 PM12/18/09
to


I am new to the package but without a url to replicate and test things,
it is hard for others to contribute.


DrS

yahalom

unread,
Dec 20, 2009, 3:32:05 AM12/20/09
to
On Dec 19, 3:43 am, drscr...@gmail.com wrote:
> Patrick wrote:
> > Did you ever get this figured out? I am having a similar problem with
> > an argument being an array of strings.
> > Patrick

not yet :-( Gerald is busy and I hope when New Year cools down he
will find the time and gives us a late Christmas present.

>
> I am new to the package but without a url to replicate and test things,
> it is hard for others to contribute.

Sometimes it is impossible to expose the url. In my case the package
gives the error BEFORE it goes out for http request so the problem is
a wsdl parsing/query building error.

>
> DrS

yahalom

unread,
Feb 10, 2010, 7:50:50 AM2/10/10
to
On Dec 20 2009, 10:32 am, yahalom <yahal...@gmail.com> wrote:
> On Dec 19, 3:43 am, drscr...@gmail.com wrote:
>
> > Patrick wrote:
> > > Did you ever get this figured out? I am having a similar problem with
> > > an argument being an array of strings.
> > > Patrick
>
> not yet :-(  Geraldis busy and I hope when New Year cools down he

> will find the time and gives us a late Christmas present.
>
>
>
> > I am new to the package but without a url to replicate and test things,
> > it is hard for others to contribute.
>
> Sometimes it is impossible to expose the url. In my case the package
> gives the error BEFORE it goes out for http request so the problem is
> a wsdl parsing/query building error.
>
>
>
> > DrS
>
>

still waiting for some info on the subject. If someone can shed a
light it will be greatly appreciated.

Georgios Petasis

unread,
Feb 10, 2010, 8:11:57 AM2/10/10
to yahalom

Where is the WSDL? Is there a specific error message during parsing?

George

yahalom

unread,
Feb 10, 2010, 8:22:24 AM2/10/10
to
On Feb 10, 3:11 pm, Georgios Petasis <peta...@iit.demokritos.gr>
wrote:

In the first post you can see the parsed wsdl. it was parsed fine and
this is why I use "::WS::Client::LoadParsedWsdl"
also the error is shown there.

drsc...@gmail.com

unread,
Feb 10, 2010, 9:28:44 AM2/10/10
to
yahalom wrote:
>
> In the first post you can see the parsed wsdl. it was parsed fine and
> this is why I use "::WS::Client::LoadParsedWsdl"
> also the error is shown there.


Well, not everyone has full access to thread history from a few months
ago. If you can't provide that info, it is hard for others to help.


DrS

Uwe Klein

unread,
Feb 10, 2010, 9:52:00 AM2/10/10
to

Georgios Petasis

unread,
Feb 10, 2010, 10:48:57 AM2/10/10
to

The WSDL is not available? Only its parsed form?

George

yahalom

unread,
Feb 10, 2010, 11:22:12 AM2/10/10
to
On Feb 10, 5:48 pm, Georgios Petasis <peta...@iit.demokritos.gr>
wrote:

> στις 10/2/2010 16:52, O/H Uwe Klein έγραψε:
>
>
>
> > drscr...@gmail.com wrote:
> >> yahalom wrote:
>
> >>> In the first post you can see the parsed wsdl. it was parsed fine and
> >>> this is why I use "::WS::Client::LoadParsedWsdl"
> >>> also the error is shown there.
>
> >> Well, not everyone has full access to thread history from a few months
> >> ago. If you can't provide that info, it is hard for others to help.
>
> >> DrS
> >http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/e85...

>
> > uwe
>
> The WSDL is not available? Only its parsed form?
>
> George

the wsdl is a bit long but here it is:

<?xml version="1.0" encoding="UTF-8" ?>

<wsdl:definitions xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://
schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/
XMLSchema">
<wsdl:types>
<schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/
XMLSchema">
<element name="connectorAction">
<complexType>
<sequence>
<element name="transportContainer" type="tns1:TransportContainer" /
>
</sequence>
</complexType>
</element>
<complexType name="ArrayOf_tns1_Property">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item"
type="tns1:Property" />
</sequence>
</complexType>
<complexType name="ArrayOf_tns1_RoutingNode">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="item"
type="tns1:RoutingNode" />
</sequence>
</complexType>
<element name="connectorActionResponse">
<complexType>
<sequence>
<element name="connectorActionReturn"
type="tns1:TransportContainer" />
</sequence>
</complexType>
</element>
<element name="connectorActionAsync">
<complexType>
<sequence>
<element name="transportContainer" type="tns1:TransportContainer" /
>
</sequence>
</complexType>
</element>
<element name="connectorActionAsyncResponse">
<complexType />
</element>
</schema>
<schema elementFormDefault="qualified" xmlns="http://www.w3.org/2001/
XMLSchema">
<complexType name="Property">
<sequence>
<element name="name" nillable="true" type="xsd:string" />
<element name="value" nillable="true" type="xsd:string" />
</sequence>
</complexType>
<complexType name="RoutingNode">
<sequence>
<element name="actionHandlerName" nillable="true" type="xsd:string" /
>
<element name="asyncRequest" type="xsd:boolean" />
<element name="auditRequired" type="xsd:boolean" />
<element name="description" nillable="true" type="xsd:string" />
<element name="endPointUrl" nillable="true" type="xsd:string" />
<element name="exceptionMessage" nillable="true" type="xsd:string" /
>
<element name="onFailureAction" nillable="true" type="xsd:string" /
>
<element name="responseXML" nillable="true" type="xsd:string" />
<element name="returnControl" type="xsd:boolean" />
<element name="status" nillable="true" type="xsd:string" />
<element name="teamNodeName" nillable="true" type="xsd:string" />
<element name="timeout" type="xsd:int" />
<element name="xmlTransit" type="xsd:boolean" />
</sequence>
</complexType>
<complexType name="TransportContainer">
<sequence>
<element name="actionName" nillable="true" type="xsd:string" />
<element name="errorCode" nillable="true" type="xsd:string" />
<element name="errorDescription" nillable="true" type="xsd:string" /
>
<element name="guid" nillable="true" type="xsd:string" />
<element name="packetType" nillable="true" type="xsd:string" />
<element name="positionIndex" type="xsd:int" />
<element name="properties" nillable="true"
type="impl:ArrayOf_tns1_Property" />
<element name="requestXML" nillable="true" type="xsd:string" />
<element name="routing" nillable="true"
type="impl:ArrayOf_tns1_RoutingNode" />
<element maxOccurs="unbounded" name="routingNodeByIndex"
nillable="true" type="tns1:RoutingNode" />
<element name="subActionName" nillable="true" type="xsd:string" />
</sequence>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="connectorActionAsyncResponse">
<wsdl:part element="impl:connectorActionAsyncResponse"
name="parameters" />
</wsdl:message>
<wsdl:message name="connectorActionResponse">
<wsdl:part element="impl:connectorActionResponse" name="parameters" /
>
</wsdl:message>
<wsdl:message name="connectorActionRequest">
<wsdl:part element="impl:connectorAction" name="parameters" />
</wsdl:message>
<wsdl:message name="connectorActionAsyncRequest">
<wsdl:part element="impl:connectorActionAsync" name="parameters" />
</wsdl:message>
<wsdl:portType name="TeamConnectorService">
<wsdl:operation name="connectorAction">
<wsdl:input message="impl:connectorActionRequest"
name="connectorActionRequest" />
<wsdl:output message="impl:connectorActionResponse"
name="connectorActionResponse" />
</wsdl:operation>
<wsdl:operation name="connectorActionAsync">
<wsdl:input message="impl:connectorActionAsyncRequest"
name="connectorActionAsyncRequest" />
<wsdl:output message="impl:connectorActionAsyncResponse"
name="connectorActionAsyncResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TeamConnectorServiceSoapBinding"
type="impl:TeamConnectorService">
<wsdlsoap:binding style="document" transport="http://
schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="connectorAction">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="connectorActionRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="connectorActionResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="connectorActionAsync">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="connectorActionAsyncRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="connectorActionAsyncResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TeamConnectorServiceService">
<wsdl:port binding="impl:TeamConnectorServiceSoapBinding"
name="TeamConnectorService">
<wsdlsoap:address location="http://test/Proxy/services/
TeamConnectorService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

0 new messages