Highlighted
New Member.
394 views

Reg SOAP webservice custom header

getting language as invalid in the response when we pass custom header by importing from external loacation.

 

Moreover explain how to add custom header

0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

Re: Reg SOAP webservice custom header

Good day girimcet,

Not sure if i understand your problem, can you provide more details?

May be add script fragment?

Highlighted
New Member.

Re: Reg SOAP webservice custom header

hi,

i have added header in custom header section along with soap request .We are getting soap fault error.Moreover we tried the same thing in parasoft soa it is working fine.whatever we are passing in the request is service header but in input argument after uploading the wsdl im not getting the service header.So, tried adding custom header .but getting invalid language in the request header.

 

Please suggest me any code changes to be done to add header in actions part or any other option to include service header in input arguments.

the following is the error im getting

 

<soap:Fault><faultcode>soap:Server</faultcode><faultstring>Invalid
Action.c(4): langauge in request header</faultstring></soap:Fault></soap:Body></soap:Envelope>

0 Likes
Highlighted
New Member.

Re: Reg SOAP webservice custom header

hi,

it would be better if you explain how to add header in case where header part in not included in the soap request

0 Likes
Highlighted
New Member.

Re: Reg SOAP webservice custom header

Hi,

below mentioned is the script genearated ...for headers i have added custom header since the header option was not replicated in input argumen

web_service_call( "StepName=retrieveContribution_116",
                     
        "SOAPMethod=******************************************************",
        "ResponseParam=response",
        "Service=RspActivityService",
        "ExpectedResponse=SoapResult",
        "Snapshot=t1467627259.inf",
        BEGIN_ARGUMENTS,
        "xml:RetrieveContributionRequest="
            "<RetrieveContributionRequest>"
                "<control>"
                    "<created>*****</created>"
                    "<user>***</user>"
                    "<session>****</session>"
                    "<language>***</language>"
                    "<country>****</country>"
                    "<startRow></startRow>"
                    "<endRow></endRow>"
                    "<totalRows></totalRows>"
                "</control>"
                "<job>****</job>"
                "<id>****</id>"
            "</RetrieveContributionRequest>",
        END_ARGUMENTS,
        BEGIN_RESULT,
        END_RESULT,
        LAST);

    web_service_call( "StepName=cancelContribution_101",
        "SOAPMethod=**************************************************",
        "SOAPHeader="
            "<SoapHeader>"
                "<SOAP-ENV:Header>"
                    "<headerinfo:info xmlns:headerinfo=\"*****************************\">"
                        "<headerinfo:user></headerinfo:user>"
                        "<headerinfo:session></headerinfo:session>"
                        "<headerinfo:language>***</headerinfo:language>"
                        "<headerinfo:country>****</headerinfo:country>"
                        "<headerinfo:application>****</headerinfo:application>"
                        "<headerinfo:created>*****</headerinfo:created>"
                    "</headerinfo:info>"
                "</SOAP-ENV:Header>"
            "</SoapHeader>",
        "ResponseParam=response",
        "Service=RspActivityService",
        "ExpectedResponse=SoapResult",
        "Snapshot=t1468233819.inf",
        BEGIN_ARGUMENTS,
        END_ARGUMENTS,
        BEGIN_RESULT,
        END_RESULT,
        LAST);

    return 0;

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.