[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Antwort: Services Header (was Re: Unresolved symbols when creating WSDL2RPG Service Program)
Mike,
> string into the request manually and it worked. Is there something
> more I have to do or should the WSDL included below have caused the
> WSDL2RPG program to generate the correct request inclusive of the
> Services header?
WSDL2RPG does not yet know about service headers. Your WSDL file is the
first one that I got that specifies a service header. I will gladly try to
enhance WSDL2RPG to support service headers in the future. However it will
take some time because curently I am working on a different enhancement.
Please turn on the debug log and send it to me. It will greaty help me to
enhance WSDL2RPG. Please also included "a.xsd" and "b.xsd", which are
referenced from your WSDL.
> debug. However when the procedure ends, the calling program crashes
> with 'Pointer not set for location'. Here is the invocation code:
The program crashes with a "Pointer not set" error because you used the
typeDef "tns_GetCoverOptionsResponse_t" to receive the data returned by
GetCoverOptionsPort_GetCoverOptions(). As mentioned in my previous
posting, type definitions always end with "_t" and are supposed to be used
with like() or likeds() to define the actual fields or data structures.
You cannot assign any data to typeDefs because of the "based(pDummy)"
keyword. As the name implies "pDummy" is never set to actual storage.
tns_GetCoverOptionsResponse_t=
GetCoverOptionsPort_GetCoverOptions(
parameters:
errText);
Please go back to your test program and search for "Response message". It
should be found right below the statement that defines "parameters":
*
* Request message
* These fields needs to be filled with reasonable values
* right before calling the web service.
D parameter DS likeds(tns_GetCoverOptionsRequest_t)
D inz
*
* Response message
* This structure contains the result values returned by
* the web service.
D GetCoverOptionsResponse...
D DS likeds(tns_GetCoverOptionsResponse_t)
D inz
*
Then change your code as shown here:
GetCoverOptionsResponse =
GetCoverOptionsPort_GetCoverOptions(
parameters:
errText);
> *RNF7030 30 008701 The name or indicator FROMDATE is not
defined.
> *RNF7030 30 008702 The name or indicator PRODUCT... is not
defined.
> 008701 parameters.FromDate= '20100324';
> 008702 parameters.ProductTypeCode= 'PLL';
The actual field names are:
parameters.CoverOptionsStandardRequest.FromDate
parameters.CoverOptionsStandardRequest.ProductTypeCode
Please have a look at the statement defining "parameters". It is a
structure of type "tns_GetCoverOptionsRequest_t" and hence "inherits" all
its sub fields. In fact there is only one sub field: "
CoverOptionsStandardRequest".
So far "parameters" is something like that:
parameters.CoverOptionsStandardRequest.?
"CoverOptionsStandardRequest" is also a structure. The typeDef used to
define "CoverOptionsStandardRequest" is "ns1_RefDataStandardRequest_t".
Hence "CoverOptionsStandardRequest" inherits all the sub fields of
"ns1_RefDataStandardRequest_t", which are "FromDate" and "ProductTypeCode
".
So in the end we know that "parameters" is a strcture like this:
parameters.CoverOptionsStandardRequest.FromDate
parameters.CoverOptionsStandardRequest.ProductTypeCode
Everything clear, now? ;-)
Regards,
Thomas.
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 26.03.2010 05:47:38:
> Von:
>
> Mike.Pantzopoulos@xxxxxxxxxx
>
> An:
>
> ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>
> Datum:
>
> 26.03.2010 05:55
>
> Betreff:
>
> Services Header (was Re: Unresolved symbols when creating WSDL2RPG
> Service Program)
>
> Gesendet von:
>
> ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>
>
>
_______________________________________________________________________________________
>
> Note: This e-mail is subject to the disclaimer contained at the
> bottom of this message.
>
_______________________________________________________________________________________
>
>
> Thanks so much for your analysis Thomas.
>
> I hope this discussion provides a guide for other newbies.
>
> I've actually got the whole thing working! With a lot of help from
> our web services people. I am progressing but still have questions.
>
> After our first attempt which failed, our services people discovered
> that the Service Header was not included in the Soap request, and I
> haven't found any reference in the list to this. We inserted the
> string into the request manually and it worked. Is there something
> more I have to do or should the WSDL included below have caused the
> WSDL2RPG program to generate the correct request inclusive of the
> Services header?
>
> When the interface program generated by WSDL2RPG runs, it receives
> the response into rtnValue. I can see the correct values through
> debug. However when the procedure ends, the calling program crashes
> with 'Pointer not set for location'. Here is the invocation code:
>
> tns_GetCoverOptionsResponse_t=
> GetCoverOptionsPort_GetCoverOptions(
> parameters:
> errText);
>
> Lastly, I also wanted to cover the last problem I raised. I've
> included the xml at the end of this email.
>
> I went back to square one to stay as close as possible to your example
code.
>
> I've included the XML used as input to WSDL2RPG so that the
> following references make sense.
> I traced all the references back to obtain the names of the
> parameters but when I compiled the test harness it failed with:
>
> *RNF7030 30 008701 The name or indicator FROMDATE is not
defined.
> *RNF7030 30 008702 The name or indicator PRODUCT... is not
defined.
>
> This is on the two fields being set into parameters:
>
> 008701 parameters.FromDate= '20100324';
> 008702 parameters.ProductTypeCode= 'PLL';
> 008800 // Now let's call the web service.
> 008801 tns_GetCoverOptionsResponse_t=
> 008900 GetCoverOptionsPort_GetCoverOptions(
> 009100 parameters:
> 009200 errText);
>
> And here is the trail of parameter declaration:
>
> * Request message
> * These fields needs to be filled with reasonable values
> * right before calling the web service.
>
> D parameters DS likeds
> (tns_GetCoverOptionsRequest_t)
> D inz
> ==================
> D tns_GetCoverOptionsRequest_t...
> D DS based(pDummy)
> D qualified
> D CoverOptionsStandardRequest...
> D likeds
> (ns1_RefDataStandardRequest_t)
> ==================
> D ns1_RefDataStandardRequest_t...
> D DS based(pDummy)
> D qualified
> D FromDate 10A varying
> D ProductTypeCode...
> D 3A varying
>
>
> Because it wasn't compiling, I ended up changing the parameters
> declaration by hand to the initial structure.
>
> D parameters DS likeds
> (ns1_refdatastandardRequest_t)
>
>
> This let me compile as the 2 parameter fields were recognized.
>
> I realize that this would have to be done every time I created the
> application interface but it enables me to continue the R&D. Any
> advice you have would be wonderful. I created the module and program
> as per your PDF and have been able to test.
>
>
> Here is the wsdl:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- $Id: GetUserIdentity_0.001.wsdl 4380 2009-06-30 01:30:56Z
> s62466 $ --><wsdl:definitions
>
targetNamespace="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptions.
> 0.001" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="
> http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://
> schemas.xmlsoap.org/wsdl/http/" xmlns:xs="
http://www.w3.org/2001/XMLSchema
> " xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="
> http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:hdr="urn:au.com.iag.xml:service.eventures.common.ServiceHeader.
> 1"
> xmlns:tns="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptions.
> 0.001"
>
xmlns:ns1="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptions.0.001">
> <wsdl:types>
> <xs:schema>
> <xs:import
> namespace="urn:au.com.iag.xml:service.thebuzz.home.GetCoverOptions.
> 0.001" schemaLocation="a.xsd"/>
> <xs:import
> namespace="urn:au.com.iag.xml:service.eventures.common.ServiceHeader.
> 1" schemaLocation="b.xsd"/>
> </xs:schema>
> </wsdl:types>
> <wsdl:message name="ServiceHeader">
> <wsdl:part name="service-header"
element="hdr:ServiceHeader"/>
> </wsdl:message>
> <wsdl:message name="GetCoverOptionsRequest">
> <wsdl:part name="parameter"
> element="ns1:GetCoverOptionsRequest"/>
> </wsdl:message>
> <wsdl:message name="GetCoverOptionsResponse">
> <wsdl:part name="parameter"
> element="ns1:GetCoverOptionsResponse"/>
> </wsdl:message>
> <wsdl:portType name="GetCoverOptionsType">
> <wsdl:operation name="GetCoverOptions">
> <wsdl:input
message="tns:GetCoverOptionsRequest"/>
> <wsdl:output
message="tns:GetCoverOptionsResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="SoapBinding" type="tns:GetCoverOptionsType">
> <soap:binding style="document" transport="http://
> schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="GetCoverOptions">
> <soap:operation
soapAction="urn:#GetCoverOptions"/>
> <wsdl:input>
> <soap:header
> message="tns:ServiceHeader" part="service-header" use="literal"/>
> <soap:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <soap:header
> message="tns:ServiceHeader" part="service-header" use="literal"/>
> <soap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="GetCoverOptionsService">
> <wsdl:port name="GetCoverOptionsPort"
> binding="tns:SoapBinding">
> <soap:address location="http://int-
> eventures-esb:11000/"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
>
>
>
>
>
_______________________________________________________________________________________
>
> The information transmitted in this message and its attachments (if
> any) is intended
> only for the person or entity to which it is addressed.
> The message may contain confidential and/or privileged material. Any
review,
> retransmission, dissemination or other use of, or taking of any
> action in reliance
> upon this information, by persons or entities other than the
> intended recipient is
> prohibited.
>
> If you have received this in error, please contact the sender and
> delete this e-mail
> and associated material from any computer.
>
> The intended recipient of this e-mail may only use, reproduce,
> disclose or distribute
> the information contained in this e-mail and any attached files,
> with the permission
> of the sender.
>
> This message has been scanned for viruses.
>
_______________________________________________________________________________________
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------