나는 운송 데이터를 전달하기 위해 웹 서비스에 비누 호출을하려고합니다.xml 오류로 인해 비누 PHP 호출에 문제가
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="http://weblabeling.gls-italy.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://www.w3.org/2003/05/soap-encoding">
<env:Body>
<ns1:AddParcel env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<!-- bof shipping array --->
<XMLInfoParcel>
<Info>
<SedeGls>XXXX</SedeGls>
<CodiceClienteGls>XXXXX</CodiceClienteGls>
<PasswordClienteGls>XXXXXX</PasswordClienteGls>
<Parcel>
<CodiceContrattoGls>XXXXXX</CodiceContrattoGls>
<RagioneSociale>XXXXXX</RagioneSociale>
<!-- other stuff here -->
</Parcel>
</Info>
</XMLInfoParcel>
<!-- eof shipping array --->
</ns1:AddParcel>
</env:Body>
</env:Envelope>
이 대신이다 난 항상 응답 XML 형식 오류로 저에게
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AddParcel xmlns="http://weblabeling.gls-italy.com/">
<XMLInfoParcel>string</XMLInfoParcel>
</AddParcel>
</soap12:Body>
</soap12:Envelope>
을 요구하고 어떤 웹 서비스 : 여기에 지금까지 보내고있다 요청합니다.
무엇이 잘못 되었나요? 배송 배열이 정확하고 요청과 완벽하게 일치합니다.
미리 감사드립니다.
편집 : 여기
내가 XML을 구축하는 방법이다 : 나는 단지 여기 ---> 넣어이 내 코드에없는
//inseriamo i dati nei corretti array
$Label = array(
'XMLInfoParcel' => array(
'Info' => array(
'SedeGls' => $SedeGls,
'CodiceClienteGls' => $CodiceClienteGls,
'PasswordClienteGls' => $PasswordClienteGls,
'Parcel' => array(
'CodiceContrattoGls' => $cod_cont,
'RagioneSociale' => $rag_soc,
'Indirizzo' => $delivery_indirizzo,
'Localita' => $delivery_city,
'Zipcode' => $data['delivery_postcode'],
'Provincia' => $data['zone_code'],
'Bda' => '',
'DataDocumentoTrasporto' => '',
'Colli' => '1',
'Incoterm' => '',
'PesoReale' => '1,00',
'ImportoContrassegno' => $imp_cont,
'NoteSpedizione' => $data['customers_telephone'],
'TipoPorto' => 'F',
'Assicurazione' => $ass_ins,
'PesoVolume' => '',
'TipoCollo' => $tipo_collo,
'FrancoAnticipata' => '',
'RiferimentoCliente' => '',
'NoteAggiuntive' => '',
'CodiceClienteDestinatario' => '',
'Email' => '',
'Cellulare1' => $telefono_1,
'Cellulare2' => '',
'ServiziAccessori' => '',
'ModalitaIncasso' => $mod_inc
),),),
);
$dom = new DOMDocumentExt('1.0', 'utf-8');
$chiamta = $dom->loadArray($Label);
$dudy = $dom->saveXML();
@Iserni을, 나는 온라인을 테스트하는거야 도구, 난 정말 오류가 표시되지 않습니다.
여전히 XML 형식의 오류가 발생합니까? 다른 단서?
편집 됨 :
<ns1:AddParcel env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
을 필요가있는 동안 :
난 그냥 내 요청이 발견
<AddParcel xmlns="http://weblabeling.gls-italy.com/">
그래서 나는 봉투도 발견 네임 스페이스와 다른 무언가가있다. 문제가 될 수 있습니까?
WSDL이 gls 서버에서 작동하지 않는 것 같습니다. 설명서에 대한 정보를 제공하지 않았습니다.
편집 :
아마 내가 바보 야하지만이 요청 XML 스키마입니다 :
이그래서 지금은 더 공백 앞에 배치해야? 당신은 어떻게 생각하십니까? 만약 그렇다면 어떻게?
비누 요청 XML을 만드는 방법과 관련 코드를 추가해야한다고 생각합니다. – hakre
php는 비누로 악몽입니다 .... 여러분의 proyect에 nusoap 라이브러리를 적용하고 XML을 수행하는 방법을 알려주십시오. – dyoser
아뇨, PHP 비누는 꽤 괜찮아요. 또한 질문을 보면 Fabio가 이미 아주 가깝다는 것을 알 수 있습니다. – hakre