Hello,
The script is very large and it works fine until this soap request (it is a web service protocol script):
soap_request("StepName=OpprettHoveddokument",
"URL={url}",
"SOAPEnvelope="
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:v1=\"http://nav.no/tjeneste/domene/brukerdialog/oppdaterehenvendelsesbehandling/v1\">"
"<soapenv:Header xmlns:wsa=\"http://www.w3.org/2005/08/addressing\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">"
"<wsse:Security>"
"<saml2:Assertion ID=\"1231231231231231321\" IssueInstant=\"2013-05-10T14:55:07.808Z\" Version=\"2.0\" xmlns:saml2=\"urn:oasis:names:tc:SAML:2.0:assertion\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">"
"<saml2:Issuer>{issuer}</saml2:Issuer>"
"<saml2:Subject>"
"<saml2:NameID Format=\"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\" NameQualifier=\"www.nav.no\">{nameID}</saml2:NameID>"
"<saml2:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\"></saml2:SubjectConfirmation>"
"</saml2:Subject>"
"<saml2:Conditions NotBefore=\"2013-05-10T14:55:07.808Z\" NotOnOrAfter=\"2017-05-09T14:55:07.808Z\"></saml2:Conditions>"
"<saml2:AttributeStatement>"
"<saml2:Attribute Name=\"authenticationLevel\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:uri\">"
"<saml2:AttributeValue xsi:type=\"xs:string\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">{authLevel}</saml2:AttributeValue>"
"</saml2:Attribute>"
"<saml2:Attribute Name=\"identType\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:uri\">"
"<saml2:AttributeValue xsi:type=\"xs:string\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">{identType}</saml2:AttributeValue>"
"</saml2:Attribute>"
"<saml2:Attribute Name=\"consumerId\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:uri\">"
"<saml2:AttributeValue xsi:type=\"xs:string\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">{consumerID}</saml2:AttributeValue>"
"</saml2:Attribute>"
"</saml2:AttributeStatement>"
"</saml2:Assertion>"
"</wsse:Security>"
"<wsa:Action>http://nav.no/tjeneste/domene/brukerdialog/oppdaterehenvendelsesbehandling/v1/OppdatereHenvendelsesBehandlingPortType/opprettDokumentRequest</wsa:Action>"
"<wsa:MessageID>OpprettHoveddokument</wsa:MessageID>"
"<wsa:To>{wsaTo}</wsa:To>"
"</soapenv:Header>"
"<soapenv:Body>"
"<v1:opprettDokument>"
"<dokument>"
"<filnavn>HoveddokumentSBS{NewParam}</filnavn>"
"<innhold>"
"<inc:Include href=\"cid:innhold\" xmlns:inc=\"http://www.w3.org/2004/08/xop/include\"></inc:Include>"
"</innhold>"
"</dokument>"
"<dokumentForventningId>{DokForvId_1}</dokumentForventningId>"
"</v1:opprettDokument>"
"</soapenv:Body>"
"</soapenv:Envelope>",
"SOAPAction=",
"ResponseParam=response",
"Snapshot=t1368541238.inf",
ATTACHMENT_ADD, "FileName=1arbeidsavklaringspenger.pdf", "ContentType=application/pdf", "ID=innhold",
ATTACHMENTS_FORMAT_MIME,
LAST);
The problem seems to be in the:
"<innhold>"
"<inc:Include href=\"cid:innhold\" xmlns:inc=\"http://www.w3.org/2004/08/xop/include\"></inc:Include>"
"</innhold>"
Because when I replace this with a base64 string and comment out the attachment_add part like this:
soap_request("StepName=OpprettHoveddokument",
"URL={url}",
"SOAPEnvelope="
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:v1=\"http://nav.no/tjeneste/domene/brukerdialog/oppdaterehenvendelsesbehandling/v1\">"
"<soapenv:Header xmlns:wsa=\"http://www.w3.org/2005/08/addressing\" xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">"
"<wsse:Security>"
"<saml2:Assertion ID=\"1231231231231231321\" IssueInstant=\"2013-05-10T14:55:07.808Z\" Version=\"2.0\" xmlns:saml2=\"urn:oasis:names:tc:SAML:2.0:assertion\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">"
"<saml2:Issuer>{issuer}</saml2:Issuer>"
"<saml2:Subject>"
"<saml2:NameID Format=\"urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\" NameQualifier=\"www.nav.no\">{nameID}</saml2:NameID>"
"<saml2:SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\"></saml2:SubjectConfirmation>"
"</saml2:Subject>"
"<saml2:Conditions NotBefore=\"2013-05-10T14:55:07.808Z\" NotOnOrAfter=\"2017-05-09T14:55:07.808Z\"></saml2:Conditions>"
"<saml2:AttributeStatement>"
"<saml2:Attribute Name=\"authenticationLevel\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:uri\">"
"<saml2:AttributeValue xsi:type=\"xs:string\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">{authLevel}</saml2:AttributeValue>"
"</saml2:Attribute>"
"<saml2:Attribute Name=\"identType\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:uri\">"
"<saml2:AttributeValue xsi:type=\"xs:string\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">{identType}</saml2:AttributeValue>"
"</saml2:Attribute>"
"<saml2:Attribute Name=\"consumerId\" NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:uri\">"
"<saml2:AttributeValue xsi:type=\"xs:string\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">{consumerID}</saml2:AttributeValue>"
"</saml2:Attribute>"
"</saml2:AttributeStatement>"
"</saml2:Assertion>"
"</wsse:Security>"
"<wsa:Action>http://nav.no/tjeneste/domene/brukerdialog/oppdaterehenvendelsesbehandling/v1/OppdatereHenvendelsesBehandlingPortType/opprettDokumentRequest</wsa:Action>"
"<wsa:MessageID>OpprettHoveddokument</wsa:MessageID>"
"<wsa:To>{wsaTo}</wsa:To>"
"</soapenv:Header>"
"<soapenv:Body>"
"<v1:opprettDokument>"
"<dokument>"
"<filnavn>HoveddokumentSBS{NewParam}</filnavn>"
"<innhold>"
"YWFhYQ=="
// "<inc:Include href=\"cid:innhold\" xmlns:inc=\"http://www.w3.org/2004/08/xop/include\"></inc:Include>"
"</innhold>"
"</dokument>"
"<dokumentForventningId>{DokForvId_1}</dokumentForventningId>"
"</v1:opprettDokument>"
"</soapenv:Body>"
"</soapenv:Envelope>",
"SOAPAction=",
"ResponseParam=response",
"Snapshot=t1368541238.inf",
// ATTACHMENT_ADD, "FileName=C:\\1arbeidsavklaringspenger.pdf", "ContentType=application/pdf", "ID=innhold",
// ATTACHMENTS_FORMAT_MIME,
LAST);
it works.
The entire script is attached