这里我试图使用期望XML输入的API。并且响应是xml格式。
这是我的Adapter .xml文件
<?xml version="1.0" encoding="UTF-8"?>
<wl:adapter name="IBMAPIM"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wl="http://www.ibm.com/mfp/integration"
xmlns:http="http://www.ibm.com/mfp/integration/http">
<displayName>IBMAPIM</displayName>
<description>IBMAPIM</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain>api.apim.ibmcloud.com</domain>
<connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
<socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
<maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
</connectionPolicy>
</connectivity>
<procedure name="getStories"/>
</wl:adapter>
这是我的Adapter imp.js文件
function getStories() {
//path = getPath(interest);
var request ='<NS1:SapPordcr101 xmlns:NS1="http://www.ibm.com/xmlns/prod/websphere/j2ca/sap/sappordcr101"><SAPTransactionID>C0A801652A3D553A6496043A</SAPTransactionID><SapPordcr101IDocBO><SapIDocControlRecord><Rcvpor>SAPMB</Rcvpor><Sndprt>KU</Sndprt><Sndpfc></Sndpfc><Test></Test><Mescod></Mescod><Idoctyp>PORDCR101</Idoctyp><Sndprn>ECCCLNT800</Sndprn><Std></Std><Arckey></Arckey><Cretim>114317</Cretim><Doctyp></Doctyp><Tabnam>EDI_DC40</Tabnam><Credat>20150424</Credat><Refgrp></Refgrp><Outmod>2</Outmod><Mandt>800</Mandt><Rcvsad></Rcvsad><Mestyp>PORDCR1</Mestyp><Rcvprn>MBCLNTPOC1</Rcvprn><Stdvrs></Stdvrs><Rcvlad></Rcvlad><Direct>1</Direct><Sndlad></Sndlad><Exprss></Exprss><Sndsad></Sndsad><Docrel>731</Docrel><Serial></Serial><Sndpor>SAPE66</Sndpor><Docnum>0000000001213759</Docnum><Stdmes>PORDCR</Stdmes><Refint></Refint><Rcvpfc></Rcvpfc><Refmes></Refmes><Mesfct></Mesfct><Cimtyp></Cimtyp><Status>30</Status><Rcvprt>LS</Rcvprt></SapIDocControlRecord><SapPordcr101DataRecord><SapPordcr101E2pordcr1001><SapPordcr101E2bpmepoheader002><PoNumber>1000035279</PoNumber><CompCode>1002</CompCode><DocType>ZEPO</DocType><DeleteInd></DeleteInd><Status></Status><CreatDate></CreatDate><CreatedBy></CreatedBy><ItemIntvl>00010</ItemIntvl><Vendor>0001020626</Vendor><Langu></Langu><LanguIso></LanguIso><Pmnttrms></Pmnttrms><Dscnt1To></Dscnt1To><Dscnt2To></Dscnt2To><Dscnt3To></Dscnt3To><DsctPct1></DsctPct1><DsctPct2></DsctPct2><PurchOrg>1000</PurchOrg><PurGroup>E01</PurGroup><Currency>USD</Currency><CurrencyIso></CurrencyIso><ExchRate></ExchRate><ExRateFx></ExRateFx><DocDate></DocDate><VperStart></VperStart><VperEnd></VperEnd><Warranty></Warranty><Quotation></Quotation><QuotDate></QuotDate><Ref1></Ref1><SalesPers></SalesPers><Telephone></Telephone><SupplVend></SupplVend><Customer></Customer><Agreement></Agreement><GrMessage></GrMessage><SupplPlnt></SupplPlnt><Incoterms1></Incoterms1><Incoterms2></Incoterms2><CollectNo></CollectNo><DiffInv></DiffInv><OurRef>NAAPQS</OurRef></SapPordcr101E2bpmepoheader002><SapPordcr101E2bpmepoheaderx002><PoNumber>X</PoNumber><CompCode>X</CompCode><DocType>X</DocType><DeleteInd>X</DeleteInd><Status></Status><CreatDate></CreatDate><CreatedBy></CreatedBy><ItemIntvl>X</ItemIntvl><Vendor>X</Vendor><Langu></Langu><LanguIso></LanguIso><Pmnttrms></Pmnttrms><Dscnt1To></Dscnt1To><Dscnt2To></Dscnt2To><Dscnt3To></Dscnt3To><DsctPct1></DsctPct1><DsctPct2></DsctPct2><PurchOrg>X</PurchOrg><PurGroup>X</PurGroup><Currency>X</Currency><CurrencyIso></CurrencyIso><ExchRate></ExchRate><ExRateFx></ExRateFx><DocDate></DocDate><VperStart></VperStart><VperEnd></VperEnd><Warranty></Warranty><Quotation></Quotation><QuotDate></QuotDate><Ref1></Ref1><SalesPers></SalesPers><Telephone></Telephone><SupplVend></SupplVend><Customer></Customer><Agreement></Agreement><GrMessage></GrMessage><SupplPlnt></SupplPlnt><Incoterms1>X</Incoterms1><Incoterms2>X</Incoterms2><CollectNo></CollectNo><DiffInv></DiffInv><OurRef>X</OurRef></SapPordcr101E2bpmepoheaderx002><SapPordcr101E2bpmepoitem001><PoItem>00010</PoItem><DeleteInd></DeleteInd><ShortText>NEW Coke Contour PET BLACK Recycle Cente</ShortText><Material></Material><MaterialExternal></MaterialExternal><MaterialGuid></MaterialGuid><MaterialVersion></MaterialVersion><Ematerial></Ematerial><EmaterialExternal></EmaterialExternal><EmaterialGuid></EmaterialGuid><EmaterialVersion></EmaterialVersion><Plant>001</Plant><StgeLoc></StgeLoc><Trackingno></Trackingno><MatlGroup>PRKS</MatlGroup><InfoRec></InfoRec><VendMat>CBK47110</VendMat><Quantity>1.0</Quantity><PoUnit>EA</PoUnit><PoUnitIso></PoUnitIso><OrderprUn>EA</OrderprUn><OrderprUnIso></OrderprUnIso><ConvNum1></ConvNum1><ConvDen1></ConvDen1><NetPrice>48.65</NetPrice><PriceUnit></PriceUnit><GrPrTime></GrPrTime><TaxCode></TaxCode><BonGrp1></BonGrp1><QualInsp></QualInsp><InfoUpd></InfoUpd><PrntPrice></PrntPrice><EstPrice></EstPrice><Reminder1></Reminder1><Reminder2></Reminder2><Reminder3></Reminder3><OverDlvTol></OverDlvTol><UnlimitedDlv></UnlimitedDlv><UnderDlvTol></UnderDlvTol><ValType></ValType><NoMoreGr></NoMoreGr><FinalInv></FinalInv><ItemCat></ItemCat><Acctasscat>K</Acctasscat><Distrib></Distrib><PartInv></PartInv><GrInd></GrInd><GrNonVal></GrNonVal><IrInd></IrInd><FreeItem></FreeItem><GrBasediv></GrBasediv><AcknReqd></AcknReqd><AcknowlNo></AcknowlNo><Agreement></Agreement><AgmtItem></AgmtItem><Shipping></Shipping><Customer></Customer><CondGroup></CondGroup><NoDisct></NoDisct><PlanDel></PlanDel><NetWeight></NetWeight><Weightunit></Weightunit><WeightunitIso></WeightunitIso><Taxjurcode></Taxjurcode><CtrlKey></CtrlKey><ConfCtrl></ConfCtrl><RevLev></RevLev><Fund></Fund><FundsCtr></FundsCtr><CmmtItem></CmmtItem><Pricedate></Pricedate><PriceDate1></PriceDate1><GrossWt></GrossWt><Volume></Volume><Volumeunit></Volumeunit><VolumeunitIso></VolumeunitIso><Incoterms1></Incoterms1><Incoterms2></Incoterms2><PreVendor></PreVendor><VendPart></VendPart><HlItem></HlItem><GrToDate></GrToDate><SuppVendor></SuppVendor><ScVendor></ScVendor><KanbanInd></KanbanInd><Ers></Ers><RPromo></RPromo><Points></Points><PointUnit></PointUnit><PointUnitIso></PointUnitIso><Season></Season><SeasonYr></SeasonYr><BonGrp2></BonGrp2><BonGrp3></BonGrp3><SettItem></SettItem><Minremlife></Minremlife><RfqNo></RfqNo><RfqItem></RfqItem><PreqNo></PreqNo><PreqItem></PreqItem><RefDoc></RefDoc><RefItem></RefItem><SiCat></SiCat><RetItem></RetItem><AtRelev></AtRelev><OrderReason></OrderReason><BrasNbm></BrasNbm><MatlUsage></MatlUsage><MatOrigin></MatOrigin><InHouse></InHouse><Indus3></Indus3><InfIndex></InfIndex><UntilDate></UntilDate><DelivCompl></DelivCompl><PartDeliv></PartDeliv><ShipBlocked></ShipBlocked><PreqName>NAAPQS</PreqName></SapPordcr101E2bpmepoitem001><SapPordcr101E2bpmepoitem001><PoItem>00020</PoItem><DeleteInd></DeleteInd><ShortText>Dasani PET BLACK Recycle Center (bottles</ShortText><Material></Material><MaterialExternal></MaterialExternal><MaterialGuid></MaterialGuid><MaterialVersion></MaterialVersion><Ematerial></Ematerial><EmaterialExternal></EmaterialExternal><EmaterialGuid></EmaterialGuid><EmaterialVersion></EmaterialVersion><Plant>001</Plant><StgeLoc></StgeLoc><Trackingno></Trackingno><MatlGroup>PARK</MatlGroup><InfoRec></InfoRec><VendMat>CDP47100</VendMat><Quantity>1.0</Quantity><PoUnit>EA</PoUnit><PoUnitIso></PoUnitIso><OrderprUn>EA</OrderprUn><OrderprUnIso></OrderprUnIso><ConvNum1></ConvNum1><ConvDen1></ConvDen1><NetPrice>52.5</NetPrice><PriceUnit></PriceUnit><GrPrTime></GrPrTime><TaxCode></TaxCode><BonGrp1></BonGrp1><QualInsp></QualInsp><InfoUpd></InfoUpd><PrntPrice></PrntPrice><EstPrice></EstPrice><Reminder1></Reminder1><Reminder2></Reminder2><Reminder3></Reminder3><OverDlvTol></OverDlvTol><UnlimitedDlv></UnlimitedDlv><UnderDlvTol></UnderDlvTol><ValType></ValType><NoMoreGr></NoMoreGr><FinalInv></FinalInv><ItemCat></ItemCat><Acctasscat>K</Acctasscat><Distrib></Distrib><PartInv></PartInv><GrInd></GrInd><GrNonVal></GrNonVal><IrInd></IrInd><FreeItem></FreeItem><GrBasediv></GrBasediv><AcknReqd></AcknReqd><AcknowlNo></AcknowlNo><Agreement></Agreement><AgmtItem></AgmtItem><Shipping></Shipping><Customer></Customer><CondGroup></CondGroup><NoDisct></NoDisct><PlanDel></PlanDel><NetWeight></NetWeight><Weightunit></Weightunit><WeightunitIso></WeightunitIso><Taxjurcode></Taxjurcode><CtrlKey></CtrlKey><ConfCtrl></ConfCtrl><RevLev></RevLev><Fund></Fund><FundsCtr></FundsCtr><CmmtItem></CmmtItem><Pricedate></Pricedate><PriceDate1></PriceDate1><GrossWt></GrossWt><Volume></Volume><Volumeunit></Volumeunit><VolumeunitIso></VolumeunitIso><Incoterms1></Incoterms1><Incoterms2></Incoterms2><PreVendor></PreVendor><VendPart></VendPart><HlItem></HlItem><GrToDate></GrToDate><SuppVendor></SuppVendor><ScVendor></ScVendor><KanbanInd></KanbanInd><Ers></Ers><RPromo></RPromo><Points></Points><PointUnit></PointUnit><PointUnitIso></PointUnitIso><Season></Season><SeasonYr></SeasonYr><BonGrp2></BonGrp2><BonGrp3></BonGrp3><SettItem></SettItem><Minremlife></Minremlife><RfqNo></RfqNo><RfqItem></RfqItem><PreqNo></PreqNo><PreqItem></PreqItem><RefDoc></RefDoc><RefItem></RefItem><SiCat></SiCat><RetItem></RetItem><AtRelev></AtRelev><OrderReason></OrderReason><BrasNbm></BrasNbm><MatlUsage></MatlUsage><MatOrigin></MatOrigin><InHouse></InHouse><Indus3></Indus3><InfIndex></InfIndex><UntilDate></UntilDate><DelivCompl></DelivCompl><PartDeliv></PartDeliv><ShipBlocked></ShipBlocked><PreqName>NAAPQS</PreqName></SapPordcr101E2bpmepoitem001><SapPordcr101E2bpmepoitemx004><PoItem>00010</PoItem><PoItemx></PoItemx><DeleteInd>X</DeleteInd><ShortText>X</ShortText><Material></Material><MaterialExternal></MaterialExternal><MaterialGuid></MaterialGuid><MaterialVersion></MaterialVersion><Ematerial></Ematerial><EmaterialExternal></EmaterialExternal><EmaterialGuid></EmaterialGuid><EmaterialVersion></EmaterialVersion><Plant>X</Plant><StgeLoc></StgeLoc><Trackingno></Trackingno><MatlGroup>X</MatlGroup><InfoRec></InfoRec><VendMat>X</VendMat><Quantity>X</Quantity><PoUnit>X</PoUnit><PoUnitIso></PoUnitIso><OrderprUn>X</OrderprUn><OrderprUnIso></OrderprUnIso><ConvNum1></ConvNum1><ConvDen1></ConvDen1><NetPrice>X</NetPrice><PriceUnit></PriceUnit><GrPrTime></GrPrTime><TaxCode></TaxCode><BonGrp1></BonGrp1><QualInsp></QualInsp><InfoUpd></InfoUpd><PrntPrice></PrntPrice><EstPrice></EstPrice><Reminder1></Reminder1><Reminder2></Reminder2><Reminder3></Reminder3><OverDlvTol></OverDlvTol><UnlimitedDlv></UnlimitedDlv><UnderDlvTol></UnderDlvTol><ValType></ValType><NoMoreGr>X</NoMoreGr><FinalInv></FinalInv><ItemCat></ItemCat><Acctasscat>X</Acctasscat><Distrib></Distrib><PartInv></PartInv><GrInd></GrInd><GrNonVal></GrNonVal><IrInd></IrInd><FreeItem>X</FreeItem><GrBasediv></GrBasediv><AcknReqd></AcknReqd><AcknowlNo></AcknowlNo><Agreement></Agreement><AgmtItem></AgmtItem><Shipping></Shipping><Customer></Customer><CondGroup></CondGroup><NoDisct></NoDisct><PlanDel></PlanDel><NetWeight></NetWeight><Weightunit></Weightunit><WeightunitIso></WeightunitIso><Taxjurcode></Taxjurcode><CtrlKey></CtrlKey><ConfCtrl></ConfCtrl><RevLev></RevLev><Fund></Fund><FundsCtr></FundsCtr><CmmtItem></CmmtItem><Pricedate></Pricedate><PriceDate1></PriceDate1><GrossWt></GrossWt><Volume></Volume><Volumeunit></Volumeunit><VolumeunitIso></VolumeunitIso><Incoterms1></Incoterms1><Incoterms2></Incoterms2><PreVendor></PreVendor><VendPart></VendPart><HlItem></HlItem><GrToDate></GrToDate><SuppVendor></SuppVendor><ScVendor></ScVendor><KanbanInd></KanbanInd><Ers></Ers><RPromo></RPromo><Points></Points><PointUnit></PointUnit><PointUnitIso></PointUnitIso><Season></Season><SeasonYr></SeasonYr><BonGrp2></BonGrp2><BonGrp3></BonGrp3><SettItem></SettItem><Minremlife></Minremlife><RfqNo></RfqNo><RfqItem></RfqItem><PreqNo></PreqNo><PreqItem></PreqItem><RefDoc></RefDoc><RefItem></RefItem><SiCat></SiCat><RetItem></RetItem><AtRelev></AtRelev><OrderReason></OrderReason><BrasNbm></BrasNbm><MatlUsage></MatlUsage><MatOrigin></MatOrigin><InHouse></InHouse><Indus3></Indus3><InfIndex></InfIndex><UntilDate></UntilDate><DelivCompl></DelivCompl><PartDeliv></PartDeliv><ShipBlocked></ShipBlocked><PreqName>X</PreqName><PeriodIndExpirationDate></PeriodIndExpirationDate><IntObjNo></IntObjNo><PckgNo></PckgNo><Batch></Batch><Vendrbatch>X</Vendrbatch></SapPordcr101E2bpmepoitemx004><SapPordcr101E2bpmepoitemx004><PoItem>00020</PoItem><PoItemx></PoItemx><DeleteInd>X</DeleteInd><ShortText>X</ShortText><Material></Material><MaterialExternal></MaterialExternal><MaterialGuid></MaterialGuid><MaterialVersion></MaterialVersion><Ematerial></Ematerial><EmaterialExternal></EmaterialExternal><EmaterialGuid></EmaterialGuid><EmaterialVersion></EmaterialVersion><Plant>X</Plant><StgeLoc></StgeLoc><Trackingno></Trackingno><MatlGroup>X</MatlGroup><InfoRec></InfoRec><VendMat>X</VendMat><Quantity>X</Quantity><PoUnit>X</PoUnit><PoUnitIso></PoUnitIso><OrderprUn>X</OrderprUn><OrderprUnIso></OrderprUnIso><ConvNum1></ConvNum1><ConvDen1></ConvDen1><NetPrice>X</NetPrice><PriceUnit></PriceUnit><GrPrTime></GrPrTime><TaxCode></TaxCode><BonGrp1></BonGrp1><QualInsp></QualInsp><InfoUpd></InfoUpd><PrntPrice></PrntPrice><EstPrice></EstPrice><Reminder1></Reminder1><Reminder2></Reminder2><Reminder3></Reminder3><OverDlvTol></OverDlvTol><UnlimitedDlv></UnlimitedDlv><UnderDlvTol></UnderDlvTol><ValType></ValType><NoMoreGr>X</NoMoreGr><FinalInv></FinalInv><ItemCat></ItemCat><Acctasscat>X</Acctasscat><Distrib></Distrib><PartInv></PartInv><GrInd></GrInd><GrNonVal></GrNonVal><IrInd></IrInd><FreeItem>X</FreeItem><GrBasediv></GrBasediv><AcknReqd></AcknReqd><AcknowlNo></AcknowlNo><Agreement></Agreement><AgmtItem></AgmtItem><Shipping></Shipping><Customer></Customer><CondGroup></CondGroup><NoDisct></NoDisct><PlanDel></PlanDel><NetWeight></NetWeight><Weightunit></Weightunit><WeightunitIso></WeightunitIso><Taxjurcode></Taxjurcode><CtrlKey></CtrlKey><ConfCtrl></ConfCtrl><RevLev></RevLev><Fund></Fund><FundsCtr></FundsCtr><CmmtItem></CmmtItem><Pricedate></Pricedate><PriceDate1></PriceDate1><GrossWt></GrossWt><Volume></Volume><Volumeunit></Volumeunit><VolumeunitIso></VolumeunitIso><Incoterms1></Incoterms1><Incoterms2></Incoterms2><PreVendor></PreVendor><VendPart></VendPart><HlItem></HlItem><GrToDate></GrToDate><SuppVendor></SuppVendor><ScVendor></ScVendor><KanbanInd></KanbanInd><Ers></Ers><RPromo></RPromo><Points></Points><PointUnit></PointUnit><PointUnitIso></PointUnitIso><Season></Season><SeasonYr></SeasonYr><BonGrp2></BonGrp2><BonGrp3></BonGrp3><SettItem></SettItem><Minremlife></Minremlife><RfqNo></RfqNo><RfqItem></RfqItem><PreqNo></PreqNo><PreqItem></PreqItem><RefDoc></RefDoc><RefItem></RefItem><SiCat></SiCat><RetItem></RetItem><AtRelev></AtRelev><OrderReason></OrderReason><BrasNbm></BrasNbm><MatlUsage></MatlUsage><MatOrigin></MatOrigin><InHouse></InHouse><Indus3></Indus3><InfIndex></InfIndex><UntilDate></UntilDate><DelivCompl></DelivCompl><PartDeliv></PartDeliv><ShipBlocked></ShipBlocked><PreqName>X</PreqName><PeriodIndExpirationDate></PeriodIndExpirationDate><IntObjNo></IntObjNo><PckgNo></PckgNo><Batch></Batch><Vendrbatch>X</Vendrbatch></SapPordcr101E2bpmepoitemx004><SapPordcr101E2bpmepoaddrdelivery000><PoItem>00010</PoItem><AddrNo></AddrNo><Formofaddr></Formofaddr><Name>001 CORP</Name><Name2></Name2><Name3></Name3><Name4></Name4><COName></COName><City>Charlotte</City><District></District><CityNo></CityNo><PostlCod1>28211</PostlCod1><PostlCod2></PostlCod2><PostlCod3></PostlCod3><PoBox></PoBox><PoBoxCit></PoBoxCit><DelivDis></DelivDis><Street></Street><StreetNo></StreetNo><StrAbbr></StrAbbr><HouseNo></HouseNo><StrSuppl1></StrSuppl1><StrSuppl2></StrSuppl2><Location></Location><Building></Building><Floor></Floor><RoomNo></RoomNo><Country>US</Country><Langu></Langu><Region>NC</Region></SapPordcr101E2bpmepoaddrdelivery000><SapPordcr101E2bpmepoaddrdelivery000><PoItem>00020</PoItem><AddrNo></AddrNo><Formofaddr></Formofaddr><Name>001 CORP</Name><Name2></Name2><Name3></Name3><Name4></Name4><COName></COName><City>Charlotte</City><District></District><CityNo></CityNo><PostlCod1>28211</PostlCod1><PostlCod2></PostlCod2><PostlCod3></PostlCod3><PoBox></PoBox><PoBoxCit></PoBoxCit><DelivDis></DelivDis><Street></Street><StreetNo></StreetNo><StrAbbr></StrAbbr><HouseNo></HouseNo><StrSuppl1></StrSuppl1><StrSuppl2></StrSuppl2><Location></Location><Building></Building><Floor></Floor><RoomNo></RoomNo><Country>US</Country><Langu></Langu><Region>NC</Region></SapPordcr101E2bpmepoaddrdelivery000><SapPordcr101E2bpmeposchedule002><PoItem>00010</PoItem><SchedLine>0001</SchedLine><DelDatcatExt>D</DelDatcatExt><DeliveryDate>04/28/2015</DeliveryDate><Quantity>1.0</Quantity></SapPordcr101E2bpmeposchedule002><SapPordcr101E2bpmeposchedule002><PoItem>00020</PoItem><SchedLine>0001</SchedLine><DelDatcatExt>D</DelDatcatExt><DeliveryDate>04/28/2015</DeliveryDate><Quantity>1.0</Quantity></SapPordcr101E2bpmeposchedule002><SapPordcr101E2bpmeposchedulx002><PoItem>00010</PoItem><SchedLine>0001</SchedLine><PoItemx>X</PoItemx><SchedLinex>X</SchedLinex><DelDatcatExt>X</DelDatcatExt><DeliveryDate>X</DeliveryDate><Quantity>X</Quantity></SapPordcr101E2bpmeposchedulx002><SapPordcr101E2bpmeposchedulx002><PoItem>00020</PoItem><SchedLine>0001</SchedLine><PoItemx>X</PoItemx><SchedLinex>X</SchedLinex><DelDatcatExt>X</DelDatcatExt><DeliveryDate>X</DeliveryDate><Quantity>X</Quantity></SapPordcr101E2bpmeposchedulx002><SapPordcr101E2bpmepoaccount002><PoItem>00010</PoItem><SerialNo>1</SerialNo><DeleteInd></DeleteInd><CreatDate></CreatDate><Quantity></Quantity><DistrPerc></DistrPerc><NetValue></NetValue><GlAccount>0000640010</GlAccount><BusArea></BusArea><Costcenter>084-20601</Costcenter><SdDoc></SdDoc><ItmNumber></ItmNumber><SchedLine></SchedLine><AssetNo></AssetNo><SubNumber></SubNumber><Orderid></Orderid><GrRcpt></GrRcpt><UnloadPt></UnloadPt><CoArea>CCB</CoArea></SapPordcr101E2bpmepoaccount002><SapPordcr101E2bpmepoaccount002><PoItem>00020</PoItem><SerialNo>1</SerialNo><DeleteInd></DeleteInd><CreatDate></CreatDate><Quantity></Quantity><DistrPerc></DistrPerc><NetValue></NetValue><GlAccount>0000640010</GlAccount><BusArea></BusArea><Costcenter>084-20601</Costcenter><SdDoc></SdDoc><ItmNumber></ItmNumber><SchedLine></SchedLine><AssetNo></AssetNo><SubNumber></SubNumber><Orderid></Orderid><GrRcpt></GrRcpt><UnloadPt></UnloadPt><CoArea>CCB</CoArea></SapPordcr101E2bpmepoaccount002><SapPordcr101E2bpmepoaccountx003><PoItem>00010</PoItem><SerialNo>1</SerialNo><PoItemx>X</PoItemx><SerialNox>X</SerialNox><DeleteInd></DeleteInd><CreatDate></CreatDate><Quantity>X</Quantity><DistrPerc>X</DistrPerc><NetValue></NetValue><GlAccount>X</GlAccount><BusArea></BusArea><Costcenter>X</Costcenter><SdDoc></SdDoc><ItmNumber></ItmNumber><SchedLine></SchedLine><AssetNo></AssetNo><SubNumber></SubNumber><Orderid></Orderid><GrRcpt></GrRcpt><UnloadPt></UnloadPt><CoArea>X</CoArea></SapPordcr101E2bpmepoaccountx003><SapPordcr101E2bpmepoaccountx003><PoItem>00020</PoItem><SerialNo>1</SerialNo><PoItemx>X</PoItemx><SerialNox>X</SerialNox><DeleteInd></DeleteInd><CreatDate></CreatDate><Quantity>X</Quantity><DistrPerc>X</DistrPerc><NetValue></NetValue><GlAccount>X</GlAccount><BusArea></BusArea><Costcenter>X</Costcenter><SdDoc></SdDoc><ItmNumber></ItmNumber><SchedLine></SchedLine><AssetNo></AssetNo><SubNumber></SubNumber><Orderid></Orderid><GrRcpt></GrRcpt><UnloadPt></UnloadPt><CoArea>X</CoArea></SapPordcr101E2bpmepoaccountx003><SapPordcr101E2bpmepotext000><PoNumber>1000035279</PoNumber><PoItem>00010</PoItem><TextId>F01</TextId><TextForm></TextForm><TextLine>NEW Coke Contour PET BLACK Recycle Center (bottles and Cans)- made out of 100% post consumer waste material--this means that this tr</TextLine></SapPordcr101E2bpmepotext000><SapPordcr101E2bpmepotext000><PoNumber>1000035279</PoNumber><PoItem>00020</PoItem><TextId>F01</TextId><TextForm></TextForm><TextLine>Dasani PET BLACK Recycle Center (bottles and Cans)- made out of 100% post consumer waste material; Includes Dasani 2011 graphic wrap</TextLine></SapPordcr101E2bpmepotext000></SapPordcr101E2pordcr1001></SapPordcr101DataRecord></SapPordcr101IDocBO></NS1:SapPordcr101>';
var input = {
method : 'get',
returnedContentType : 'xml',
//path : '/miracle2/sb/CurrencyConvertor?client_id=63a0e0e1-5b7f-44a8-9c1c-2a448771a3c5'
//path :'zeeshan-alis-company/sb/Stock/V1/Ind/StockDetails?client_id=f277758d-085a-47a3-b596-cd44b6f5e54e',
path:'zeeshan-alis-company/sb/SAPDEMO/V1/Response',
body :{
content :request,
contentType:xml
}
};
return WL.Server.invokeHttp(input);
}
但在这里我无法消耗它。我得到了像
这样的热情 {
"errors": [
"Ecma Error: ReferenceError: \"xml\" is not defined. (2015-08-05T14:52:28.369Z\/65435a8348417bc610fbff3a4b04a6bc04fbb76b\/IBMAPIM-impl.js#45)"
],
"info": [
],
"isSuccessful": false,
"warnings": [
]
}
答案 0 :(得分:0)
对我来说,contentType定义似乎不对。
尝试将contentType:xml
更改为contentType: 'text/xml; charset=utf-8'
。