HI,
I calling TIBCO web service from SAP. I converted the sap data into XML format using STRANS Tcode and sending the data.I'm getting
404 error code ( not found ) in CALL METHOD lo_http_client->response->get_status. Is there any problem in XLST transformation.
I'm not getting where i'm wrong . Could please help on this.
Here i'm attachming my XLST code and program
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sapxsl="http://www.sap.com/sapxsl"
xmlns:asx="http://www.sap.com/abapxml"
xmlns:sch="http://www.tibco.com/schemas/getItem/SharedResources/Schemas/Schema.xsd2"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
exclude-result-prefixes="asx" version="1.0">
<xsl:output encoding="utf-8" indent="yes" method="xml" version="1.0"/>
<xsl:template match="/">
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sch="http://www.tibco.com/schemas/getItem/SharedResources/Schemas/Schema.xsd2">
<soapenv:Header>
<soapenv:Body>
<!-- <quot:GetPartComplianceByRoHS xmlns:quot="http://www.tibco.com/be/ontology/GPSCRoHSPII_V1_1/">-->
<sch:GetPartComplianceByRoHSByBinding xmlns:sch="http://www.tibco.com/be/ontology/GPSCRoHSPII_V1_1/">
<sch:ROHSRequest>
<sch:RoHSHeader>
<sch:Origin>
<sch:CIName>
<xsl:value-of select="asx:abap/asx:values/wa_data/MANDT"/>
</sch:CIName>
</sch:Origin>
</sch:RoHSHeader>
</sch:ROHSRequest>
</sch:GetPartComplianceByRoHSByBinding>
</soapenv:Body>
</soapenv:Header>
</soapenv:Envelope>
</xsl:template>
</xsl:transform>
PROGRAM
CALL TRANSFORMATION ZXML
SOURCE wa_data = ls_data
RESULT XML g_xml.
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
* Send data to TIBCO
i_rfcdes_http = 'XXXXXXX'.
* defined http destination....
CALL METHOD cl_http_client=>create_by_destination
EXPORTING
destination = i_rfcdes_http
IMPORTING
client = lo_http_client
EXCEPTIONS
destination_not_found = 1
internal_error = 2
argument_not_found = 3
destination_no_authority = 4
plugin_not_active = 5
OTHERS = 6.
IF sy-subrc <> 0.
* RAISE destination_not_found.
ENDIF.
IF i_content_type = space.
i_content_type = 'text/xml; charset=utf-8'.
ENDIF.
CALL METHOD lo_http_client->request->set_content_type
EXPORTING
content_type = i_content_type.
***Set the Request type to GET
CALL METHOD lo_http_client->request->set_header_field
EXPORTING
name = '~request_method'
value = 'POST'.
* Add our data to the http body...
CALL METHOD lo_http_client->request->set_cdata
EXPORTING
data = g_xml
EXCEPTIONS
OTHERS = 1.
lv_timeout = if_http_client=>co_timeout_default.
** Post the data...
CALL METHOD lo_http_client->send
EXPORTING
timeout = lv_timeout
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
call method lo_http_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
*
IF sy-subrc <> 0.
CALL METHOD lo_http_client->get_last_error
IMPORTING
code = lv_subrc
message = http_status_text.
ELSE.
* Grab http status reported by remote server...
CALL METHOD lo_http_client->response->get_status
IMPORTING
code = lv_subrc
reason = http_status_text.
* http_status = lv_http_status.
ENDIF.
clear greponse_xml .
CALL METHOD lo_http_client->response->get_cdata
RECEIVING
data = greponse_xml .
*
* Kill the http connection after data is sent...
CALL METHOD lo_http_client->close
EXCEPTIONS
http_invalid_state = 1
OTHERS = 2.
Thanks
Suresh