Меню

Ошибка разбора wsdl неверный формат wsdl описания

WSDL (англ. Web Services Description Language) — язык описания веб-сервисов и доступа к ним, основанный на языке XML.

После успешной публикаций web сервиса 1С  нужно проверить доступность и корректность файла WSDL.  Для этого нужно запустить любой браузер  по адресу

http://www.ИмяСайта.ru/ПутьНаСайте/ИмяФайла.1cws?wsdl

Например,  Запустите работающий сервис сбербанка  http://www.cbr.ru/dailyinfowebserv/dailyinfo.asmx?WSDL

Браузер должен отобразить некий файл XML  и не выдавать ошибку или пустую страницу или невнятный текст на любой кодировке.

Существуют 2 способа загрузки WSDL файл веб- сервиса в 1С:

  1. Статическая ссылка  (Добавление WS-ссылки 1С )  – WS-ссылки 1С это объект 1С, который расположен в конфигурации в ветке Общие/WS-ссылки 1С.  Добавление ссылки на веб сервис производится автоматически. Нажмите правой кнопкой на ветку, выберите Добавить, укажите путь к WSDL описанию веб сервиса.  В результате добавления WS-ссылки 1С будет создана автоматически такая же структура, как создается вручную при добавлении Web сервиса.
  2.  Динамическая ссылка ( WsСоединение )  – В этом случае на импорт WSDL в момент создания объекта будет потрачено определенное время

Подробнее  о динамических и статических ссылках по материалам из диска ИТС я написал    здесь

Часто при загрузке  WSDL файл  статически (WS-ссылки)  или динамически (WsСоединение)  может возникать ошибку типа нет соединения с веб сервисом  или не верный формат данных в файле WSDL

Особенность загрузки WSDL в 1С в том, что валидные схемы могут не загружаться. Никакого встроенного валидатора нет, поэтому приходится искать ошибку методом деструктивного анализа, последовательно уменьшая количество элементов в схеме.

Веб -программисты  используют программу Web Services Validation Tool for WSDL and SOAP для создания, проверки, передачи и приема SOAP-сообщений.

  Вот например, файл WSDL( см рис 1)  в 1С не загружается и выдается ошибка о неверном формате.  Сначала я  удалил описание веб-сервиса в XML-редакторе и ничего не получилось, но когда  я убрал , все что связано со словами  «policies» удалось загружать

Рис 1. Не верный формат WSDL -файла для загрузки в 1С

I’m programming a SOAP client for an existing soap web service.
I’m using Wildfly8.2 as a server where the client is and JbossWS, JAX-WS

I generated the classes needed to call the service via eclispe with the NEW-> Web service client wizzard

When I call the service I got the error INVALID_WSDL … the stack trace is on the bottom.

The actual problematic service call is the call to «addService» method of the web service.

This is the code that I use to call the service:

SOAP service1 = new SOAP();
WorkflowEditor workflowEditor = service1.getSOAPPort();

AddService parameters = new AddService();
parameters.setLogicalURI(logicalUri);
parameters.setServiceDescription(serviceDescription);
parameters.setServiceType(servicetype.getName());
Specialties specialities = new Specialties();
specialities.getSpecialty().add("aaaa");
parameters.setSpecialties(specialities);
parameters.setWsdlLocation(wsdlLocation);
parameters.setWsdlServiceName(wsdlServiceName);
parameters.setSessionToken(currentUser.getKeystoneSessionToken());
workflowEditor.addService(parameters);

the generated java class for the parameters in the soap call:

package si.arctur.services.workflowEditor;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {

})
@XmlRootElement(name = "addService")
public class AddService {

    @XmlElement(required = true)
    protected String sessionToken;
    @XmlElement(required = true)
    protected String wsdlLocation;
    @XmlElement(required = true)
    protected String wsdlServiceName;
    @XmlElement(required = true)
    protected String logicalURI;
    @XmlElement(required = true)
    protected String serviceType;
    protected AddService.Specialties specialties;
    @XmlElement(required = true)
    protected String serviceDescription;


    public String getSessionToken() {
        return sessionToken;
    }


    public void setSessionToken(String value) {
        this.sessionToken = value;
    }


    public String getWsdlLocation() {
        return wsdlLocation;
    }


    public void setWsdlLocation(String value) {
        this.wsdlLocation = value;
    }


    public String getWsdlServiceName() {
        return wsdlServiceName;
    }


    public void setWsdlServiceName(String value) {
        this.wsdlServiceName = value;
    }


    public String getLogicalURI() {
        return logicalURI;
    }


    public void setLogicalURI(String value) {
        this.logicalURI = value;
    }


    public String getServiceType() {
        return serviceType;
    }


    public void setServiceType(String value) {
        this.serviceType = value;
    }


    public AddService.Specialties getSpecialties() {
        return specialties;
    }


    public void setSpecialties(AddService.Specialties value) {
        this.specialties = value;
    }

    public String getServiceDescription() {
        return serviceDescription;
    }


    public void setServiceDescription(String value) {
        this.serviceDescription = value;
    }


    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "specialty"
    })
    public static class Specialties {

        @XmlElement(required = true)
        protected List<String> specialty;


        public List<String> getSpecialty() {
            if (specialty == null) {
                specialty = new ArrayList<String>();
            }
            return this.specialty;
        }

    }

}

This is the wsdl copied from the browser:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="WorkflowEditor" targetNamespace="*****************" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wfe="*****************" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <wsdl:types>
    <xsd:schema targetNamespace="*****************">
      <xsd:element name="addService">
        <xsd:complexType>
          <xsd:all>
            <xsd:element name="sessionToken" type="xsd:string"/>
            <xsd:element name="wsdlLocation" type="xsd:string"/>
            <xsd:element name="wsdlServiceName" type="xsd:string"/>
            <xsd:element name="logicalURI" type="xsd:string"/>
            <xsd:element name="serviceType" type="xsd:string"/>
            <xsd:element maxOccurs="1" minOccurs="0" name="specialties">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element maxOccurs="unbounded" minOccurs="1" name="specialty" type="xsd:string">
                        </xsd:element>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="serviceDescription" type="xsd:string">
            </xsd:element>
            <xsd:element name="serviceTitle" type="xsd:string"/>
          </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="addServiceResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="success" type="xsd:boolean"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="removeService">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="serviceURI" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="removeServiceResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="addUserToService">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="serviceURI" type="xsd:string"/>
                <xsd:element name="username" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="addUserToServiceResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="removeUserFromService">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="serviceURI" type="xsd:string"/>
                <xsd:element name="username" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="removeUserFromServiceResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="addWorkflow">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="workflowDescription_base64" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="addWorkflowResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="removeWorkflow">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="workflowURI" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="removeWorkflowResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="replaceWorkflow">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="workflowDescription_base64" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="replaceWorkflowResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getWorkflowDescription">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="workflowURI" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getWorkflowDescriptionResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
                <xsd:element name="workflowDescription_base64" type="xsd:string"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getWorkflows">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getWorkflowsResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
                <xsd:element name="workflows">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="workflow" type="xsd:string"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServices">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServicesResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
                <xsd:element name="services">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="service" type="xsd:string"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServiceIOs">
        <xsd:complexType>
            <xsd:all>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="serviceURI" type="xsd:string"/>
            </xsd:all>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServiceIOsResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
                <xsd:element name="serviceIOs">
                    <xsd:complexType>
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="serviceIO" type="xsd:string"/>
                        </xsd:sequence>
                    </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServiceInfo">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="sessionToken" type="xsd:string"/>
                <xsd:element name="serviceURI" type="xsd:string"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServiceInfoResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="description" type="xsd:string"/>
                <xsd:element name="wsdlLink" type="xsd:string"/>
                <xsd:element name="title" type="xsd:string"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServicesInfo">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="sessionToken" type="xsd:string"/>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      <xsd:element name="getServicesInfoResponse">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="success" type="xsd:boolean"/>
                <xsd:element name="services">
                    <xsd:complexType>
                            <xsd:sequence>
                                <xsd:element maxOccurs="unbounded" minOccurs="0" name="service">
                                    <xsd:complexType>
                                        <xsd:sequence>
                                            <xsd:element maxOccurs="1" minOccurs="1" name="serviceURI" type="xsd:string">
                                            </xsd:element>
                                            <xsd:element maxOccurs="1" minOccurs="0" name="serviceDescription" type="xsd:string">
                                            </xsd:element>
                                            <xsd:element maxOccurs="1" minOccurs="1" name="serviceWSDL" type="xsd:string">
                                            </xsd:element>
                                            <xsd:element maxOccurs="1" minOccurs="1" name="serviceTitle" type="xsd:string">
                                            </xsd:element>
                                        </xsd:sequence>
                                    </xsd:complexType>
                                </xsd:element>
                                </xsd:sequence>
                        </xsd:complexType>
                </xsd:element>
            </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="removeWorkflowRequest">
    <wsdl:part name="parameters" element="wfe:removeWorkflow">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="addWorkflowRequest">
    <wsdl:part name="parameters" element="wfe:addWorkflow">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="removeUserFromServiceRequest">
    <wsdl:part name="parameters" element="wfe:removeUserFromService">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="removeServiceRequest">
    <wsdl:part name="parameters" element="wfe:removeService">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServicesRequest">
    <wsdl:part name="parameters" element="wfe:getServices">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="removeUserFromServiceResponse">
    <wsdl:part name="parameters" element="wfe:removeUserFromServiceResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="replaceWorkflowRequest">
    <wsdl:part name="parameters" element="wfe:replaceWorkflow">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServicesInfoRequest">
    <wsdl:part name="parameters" element="wfe:getServicesInfo">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getWorkflowDescriptionRequest">
    <wsdl:part name="parameters" element="wfe:getWorkflowDescription">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServicesResponse">
    <wsdl:part name="parameters" element="wfe:getServicesResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServiceIOsResponse">
    <wsdl:part name="parameters" element="wfe:getServiceIOsResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServiceInfoResponse">
    <wsdl:part name="parameters" element="wfe:getServiceInfoResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="addUserToServiceResponse">
    <wsdl:part name="parameters" element="wfe:addUserToServiceResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="removeWorkflowResponse">
    <wsdl:part name="parameters" element="wfe:removeWorkflowResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getWorkflowDescriptionResponse">
    <wsdl:part name="parameters" element="wfe:getWorkflowDescriptionResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServiceInfoRequest">
    <wsdl:part name="parameters" element="wfe:getServiceInfo">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getWorkflowsResponse">
    <wsdl:part name="parameters" element="wfe:getWorkflowsResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServiceIOsRequest">
    <wsdl:part name="parameters" element="wfe:getServiceIOs">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="replaceWorkflowResponse">
    <wsdl:part name="parameters" element="wfe:replaceWorkflowResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="addServiceResponse">
    <wsdl:part name="parameters" element="wfe:addServiceResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="addUserToServiceRequest">
    <wsdl:part name="parameters" element="wfe:addUserToService">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="removeServiceResponse">
    <wsdl:part name="parameters" element="wfe:removeServiceResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getServicesInfoResponse">
    <wsdl:part name="parameters" element="wfe:getServicesInfoResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="addWorkflowResponse">
    <wsdl:part name="parameters" element="wfe:addWorkflowResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="getWorkflowsRequest">
    <wsdl:part name="parameters" element="wfe:getWorkflows">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="addServiceRequest">
    <wsdl:part name="parameters" element="wfe:addService">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="WorkflowEditor">
    <wsdl:operation name="addService">
      <wsdl:input message="wfe:addServiceRequest">
    </wsdl:input>
      <wsdl:output message="wfe:addServiceResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="removeService">
      <wsdl:input message="wfe:removeServiceRequest">
    </wsdl:input>
      <wsdl:output message="wfe:removeServiceResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="addUserToService">
      <wsdl:input message="wfe:addUserToServiceRequest">
    </wsdl:input>
      <wsdl:output message="wfe:addUserToServiceResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="removeUserFromService">
      <wsdl:input message="wfe:removeUserFromServiceRequest">
    </wsdl:input>
      <wsdl:output message="wfe:removeUserFromServiceResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="addWorkflow">
      <wsdl:input message="wfe:addWorkflowRequest">
    </wsdl:input>
      <wsdl:output message="wfe:addWorkflowResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="removeWorkflow">
      <wsdl:input message="wfe:removeWorkflowRequest">
    </wsdl:input>
      <wsdl:output message="wfe:removeWorkflowResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="replaceWorkflow">
      <wsdl:input message="wfe:replaceWorkflowRequest">
    </wsdl:input>
      <wsdl:output message="wfe:replaceWorkflowResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getWorkflowDescription">
      <wsdl:input message="wfe:getWorkflowDescriptionRequest">
    </wsdl:input>
      <wsdl:output message="wfe:getWorkflowDescriptionResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getWorkflows">
      <wsdl:input message="wfe:getWorkflowsRequest">
    </wsdl:input>
      <wsdl:output message="wfe:getWorkflowsResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServices">
      <wsdl:input message="wfe:getServicesRequest">
    </wsdl:input>
      <wsdl:output message="wfe:getServicesResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServiceIOs">
      <wsdl:input message="wfe:getServiceIOsRequest">
    </wsdl:input>
      <wsdl:output message="wfe:getServiceIOsResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServiceInfo">
      <wsdl:input message="wfe:getServiceInfoRequest">
    </wsdl:input>
      <wsdl:output message="wfe:getServiceInfoResponse">
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServicesInfo">
      <wsdl:input message="wfe:getServicesInfoRequest">
    </wsdl:input>
      <wsdl:output message="wfe:getServicesInfoResponse">
    </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="WorkflowEditorSOAP" type="wfe:WorkflowEditor">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="addService">
      <soap:operation soapAction="*****************addService"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="removeService">
      <soap:operation soapAction="*****************removeService"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="addUserToService">
      <soap:operation soapAction="*****************addUserToService"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="removeUserFromService">
      <soap:operation soapAction="*****************removeUserFromService"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="addWorkflow">
      <soap:operation soapAction="*****************addWorkflow"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="removeWorkflow">
      <soap:operation soapAction="*****************removeWorkflow"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="replaceWorkflow">
      <soap:operation soapAction="*****************replaceWorkflow"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getWorkflowDescription">
      <soap:operation soapAction="*****************getWorkflowDescription"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getWorkflows">
      <soap:operation soapAction="*****************getWorkflows"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServices">
      <soap:operation soapAction="*****************getServices"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServiceIOs">
      <soap:operation soapAction="*****************getServiceIOs"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServiceInfo">
      <soap:operation soapAction="*****************getServiceInfo"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="getServicesInfo">
      <soap:operation soapAction="*****************getServicesInfo"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SOAP">
    <wsdl:port name="SOAPPort" binding="wfe:WorkflowEditorSOAP">
      <soap:address location="*******************************"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

The stack trace error:

Caused by: javax.wsdl.WSDLException: WSDLException (at /html): faultCode=INVALID_WSDL: Expected element '{http://schemas.xmlsoap.org/wsdl/}definitions'.
at com.ibm.wsdl.xml.WSDLReaderImpl.checkElementName(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at org.apache.axis2.description.AxisService.createClientSideAxisService(AxisService.java:2317)
... 29 more

21 / 21 / 3

Регистрация: 22.04.2014

Сообщений: 112

1

17.08.2015, 12:21. Показов 4949. Ответов 6


Здравствуйте, проблема такая есть веб сервис https://4totam.4totam.ru/4/WsAgents.svc?wsdl. Когда пытаюсь загрузить данные с этого этого файла пишет «неверный формат»(загружал через WS-ссылки). Посмотрел файл вроде как обычный. Но потом оказалось он несколько модифицированный. Подскажите как быть? Хотелось бы через WS-ссылки сделать, но есть еще com Объект( через него работает 100%). Погуглил говорили чисто программно можно обращаться и передавать данные.. Может кто сталкивался?

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



SPR1TE89

21 / 21 / 3

Регистрация: 22.04.2014

Сообщений: 112

19.08.2015, 09:32

 [ТС]

2

Получилось загрузить обертку веб сервис, но теперь другая проблема

1C
1
 Ошибка при вызове метода контекста (CheckAuthority): Ошибка вызова операции сервиса:  {http://tempuri.org/}:WsAgentsService:CheckAuthority(): Неизвестная ошибка. Ошибка работы с Интернет:   Удаленный узел не прошел проверку: Ошибка работы с Интернет:   Удаленный узел не прошел проверку.

Когда передаю сертификат он так ругается, когда даю системе выбрать сертификат ругается так

1C
1
 Ошибка при вызове метода контекста (CheckAuthority): Ошибка вызова операции сервиса:  {http://tempuri.org/}:WsAgentsService:CheckAuthority(): Ошибка HTTP:  HTTP Status (403).

Через браузер с этим сертификатом захожу все хорошо. Но вот когда к методам обращаюсь вылетают такие ошибки. Куда копать то?



0



340 / 315 / 43

Регистрация: 20.08.2014

Сообщений: 1,242

Записей в блоге: 1

19.08.2015, 10:31

3

SPR1TE89, платформа, может быть в свежем релизе поправили чего-нить с ssl



0



21 / 21 / 3

Регистрация: 22.04.2014

Сообщений: 112

19.08.2015, 10:38

 [ТС]

4

1c-k, Платформа 8.3.6.2041. Более менее свежая.
Кто нибудь может скинуть ссылку на рабочий пример https и сертификатами ? Только не центробанк и аэрофлоты всякие. Там уже смотрел не много не то.



0



340 / 315 / 43

Регистрация: 20.08.2014

Сообщений: 1,242

Записей в блоге: 1

19.08.2015, 10:41

5

Цитата
Сообщение от SPR1TE89
Посмотреть сообщение

{http://tempuri.org/}:WsAgentsService:CheckAuthority(): Ошибка HTTP: *HTTP Status (403).

У меня конечно странный вопрос, но почему HTTP вместо HTTPS?



0



21 / 21 / 3

Регистрация: 22.04.2014

Сообщений: 112

19.08.2015, 10:53

 [ТС]

6

1c-k, WSDL такой у него target name space прописан http://tempuri.org/ . Но обращается он к https://4totam.4totam.ru/4/WsAgents.svc. В отладчике в wsПрокси.ТочкаСоединения такой адрес : https://4totam.4totam.ru/4/WsAgents.svc. Может дело в кривом wsdl нике? Просто в нем прописаны такие тэги связанные с сертификатом. Их пришлось удалить, чтоб просто загрузить обертку веб сервиса. НО все остальные пакеты и вебсервис, загрузились нормально без ошибок. А изначально когда грузил WSDL вылетала ошибка, неверный формат….



0



340 / 315 / 43

Регистрация: 20.08.2014

Сообщений: 1,242

Записей в блоге: 1

19.08.2015, 11:43

7

Цитата
Сообщение от SPR1TE89
Посмотреть сообщение

Может дело в кривом wsdl нике?

может в нём, тут я не подскажу.



0



Форум 1С : Все вопросы » WEB-сервисы, WS-ссылки, XDTO-пакеты WEB-сервисы, WS-ссылки, XDTO-пакеты

z2z5
20.02.2015 12:43 Прочитано: 2658

Имеется веб сервис, его адрес «

Yandex
Возможно, вас также заинтересует

Реклама на портале

E_Migachev
21.02.2015 16:56 Ответ № 1

и?

z2z5
24.02.2015 07:00 Ответ № 2

Видимо произошел глюк ) вопрос:

Имеется веб сервис https://parcel4u-test.xlogics.eu/BlackBox/P4UService.svc?wsdl при попытки импортировать  wsссылку или создать wsопределение выдает «неверный формат». На других платформах работает, в 1С не хочет. 

Подсказка: Для выделения Кода используйте (в редакторе).

Вы не можете отправить комментарий анонимно, пожалуйста войдите или зарегистрируйтесь.

[ Главная | FAQ: Все | 7.х | 8.х | 8.2 УП | 8.3 | Видео | Files | Forum | Freelance | Поиск | Реклама на HelpF.pro | Обратная связь ]
HelpF.pro [old Help1C.com] 2009-2023 Все материалы, размещенные на сайте, добавлены посетителями сайта или взяты из свободных источников. Подробнее…

Автор Сообщение

[Post New]15/11/2017 22:18:21

    

Тема: Re:Интеграция с 1С

[Up]

Андрей Любимов

Зарегистрирован: 17/10/2017 16:58:56
Сообщений: 12

Оффлайн



Мне просто интересно. На кой в IncomingOperation элементы consignment и vetCertificate имеют списочный тип, ЕСЛИ ТУДА ВСЕ РАВНО МОЖНО ЗАПИХАТЬ ТОЛЬКО ПО ОДНОМУ ЭЛЕМЕНТУ?


[Post New]16/11/2017 03:44:12

    

Тема: Re:Интеграция с 1С

[Up]

anig99

Зарегистрирован: 21/10/2016 20:05:29
Сообщений: 143

Оффлайн


anig99 wrote:Если у кого возникнет такая проблема, то на платформе 8.2.19.121 возникает ошибка

Определения = Новый WSОпределения(«http://api.vetrf.ru/schema/platform/services/2.0-RC-last/ams-mercury-g2b.service_v2.0_pilot.wsdl»);

по причине:

При создании описания сервиса произошла ошибка.

по причине:

Неправильный путь к файлу ‘ApplicationManagementService_v1.1.wsdl’

На 8.3 такой ошибки нет. Попытаюсь решить. Если получится, то сообщу.

Решил. http://api.vetrf.ru/schema/platform/services/2.0-RC-last/ams-mercury-g2b.service_v2.0_pilot.wsdl вообще не нужен. Вместо него достаточно ApplicationManagementService_v1.1.wsdl программно или как wsdl ссылку в конфигурацию. Спасибо mevgenym за его код https://github.com/mevgenym/1c_vetis.api

Для получения Фабрики нужно использовать такой код:

Не понятно как влияет, но ЗапросWeb = Новый HTTPЗапрос(«platform/services/ApplicationManagementService»); использовал ЗапросWeb = Новый HTTPЗапрос(«platform/services/2.0/ApplicationManagementService»); Вроде работает и так, и так.

serviceID поменять с mercury-g2b.service на mercury-g2b.service:2.0


[Post New]16/11/2017 11:22:12

    

Тема: Re:Интеграция с 1С

[Up]

nifor

[Avatar]

Зарегистрирован: 21/04/2017 04:01:50
Сообщений: 150

Оффлайн



Коллеги добрый день !!! Подскажите у кого то посредством 1С получилось заполнить атрибуты id и for (api 2.0) ? При заполнении строковым типом ругается на неверный формат при отправке запроса !!!

Это сообщение было редактировано 1 раз. Последнее обновление произошло в 16/11/2017 11:22:29


[Post New]16/11/2017 19:44:13

    

Тема: Re:Интеграция с 1С

[Up]

vvche

Зарегистрирован: 13/06/2016 19:39:45
Сообщений: 45

Оффлайн


nifor wrote:Коллеги добрый день !!! Подскажите у кого то посредством 1С получилось заполнить атрибуты id и for (api 2.0) ? При заполнении строковым типом ругается на неверный формат при отправке запроса !!!

Подчеркивание впереди прицепите. Там базовый тип «NCName», а он должен содержать первым символом или букву или подчеркивание.


[Post New]16/11/2017 23:55:32

    

Тема: Re:Интеграция с 1С

[Up]

vvche

Зарегистрирован: 13/06/2016 19:39:45
Сообщений: 45

Оффлайн



Вот не пойму, в чем косяк.

Формирую ProcessIncomingConsignmentOperation в версии 2,0.

При сохранении XML с помощью ФабрикиXDTO «перепрыгивают» реквизиты.

(ФабрикаXDTO создается по рекомендациям, выложенным здесь на форуме, та же схема с 1,4 отрабатывала без проблем)

И вот эти issueDate и issueNumber, относящиеся к vetCertificate, почему-то уезжают вниз, хотя должны идти следом за issueSeries.

В итоге пакет шлюзом не принимается, выдает отлуп «Format validation failed due to XML Schema rules: Элемент ‘issueDate’ не предусмотрен.» — я так понимаю, что порядок элементов ему важен.

В SOAPui элементы на место поставишь — запрос проходит.

Грешил на релиз платформы, но на 8.3.8 , 8.3.9 , 8.3.10 результат одинаков.

1С, что-ли, не берет во внимание тег <xs:sequence> в XSD-схеме?..


[Post New]17/11/2017 04:55:36

    

Тема: Re:Интеграция с 1С

[Up]

nifor

[Avatar]

Зарегистрирован: 21/04/2017 04:01:50
Сообщений: 150

Оффлайн


vvche wrote:

nifor wrote:Коллеги добрый день !!! Подскажите у кого то посредством 1С получилось заполнить атрибуты id и for (api 2.0) ? При заполнении строковым типом ругается на неверный формат при отправке запроса !!!

Подчеркивание впереди прицепите. Там базовый тип «NCName», а он должен содержать первым символом или букву или подчеркивание.

Спасибо огромное !!!


[Post New]17/11/2017 08:51:48

    

Тема: Re:Интеграция с 1С

[Up]

vvche

Зарегистрирован: 13/06/2016 19:39:45
Сообщений: 45

Оффлайн


vvche wrote:Вот не пойму, в чем косяк.

Формирую ProcessIncomingConsignmentOperation в версии 2,0.

При сохранении XML с помощью ФабрикиXDTO «перепрыгивают» реквизиты.

Сам спросил, сам ответил

При импорте схемы document_v2.0.xsd 1С выставила в типе объекта VetDocument свойство «Упорядоченный» в «Ложь», отсюда и косяк.

Причем у базового типа Document все нормально.


[Post New]17/11/2017 13:50:10

    

Тема: Re:Интеграция с 1С

[Up]

ashugaenko

Зарегистрирован: 28/02/2017 11:51:59
Сообщений: 8

Оффлайн



.

Это сообщение было редактировано 1 раз. Последнее обновление произошло в 17/11/2017 16:38:37


[Post New]20/11/2017 14:36:33

    

Тема: Re:Интеграция с 1С

[Up]

mevgenym

Зарегистрирован: 19/05/2017 14:03:42
Сообщений: 312

Оффлайн



Появилась обратная «совместимость» с 1.4 по упаковкам (смотрел через getStockEntryChangesList):

— непонятно по каким соображениям назначился уровень и он разный

— почти все без количества и количество так и не соответствует 1.4

https://github.com/mevgenym/1c_vetis.api_v1.1

https://github.com/mevgenym/1c_vetis.api


[Post New]21/11/2017 17:00:15

    

Тема: Re:Интеграция с 1С

[Up]

FCool

Зарегистрирован: 21/11/2017 16:50:37
Сообщений: 3

Оффлайн



Добрый день.

Вопрос по API 2

Пытаюсь создать предприятие методом ModifyEnterpriseOperation

Определение = Новый WSОпределения(«http://api.vetrf.ru/schema/platform/services/2.0-RC-last/ams-mercury-g2b.service_v2.0_pilot.wsdl»);

ПодключениеОбмена = Новый WSПрокси(Определение,»http://api.vetrf.ru/schema/cdm/application/service»,»ApplicationManagementServiceBindingQSService»,»ApplicationManagementServiceBindingQSPort»,,, Новый ЗащищенноеСоединениеOpenSSL( неопределено, неопределено ));

ПодключениеОбмена.Пользователь = «*************»;

ПодключениеОбмена.Пароль = «************»;

SubmitApplicationRequest = Фабрика.Создать(Фабрика.Тип(«http://api.vetrf.ru/schema/cdm/application/ws-definitions», «submitApplicationRequest»));

Application = Фабрика.Создать(Фабрика.Тип(«http://api.vetrf.ru/schema/cdm/application», «Application»));

ApplicationDataWrapper = Фабрика.Создать(Фабрика.Тип(«http://api.vetrf.ru/schema/cdm/application», «ApplicationDataWrapper»));

modifyEnterpriseRequest = Фабрика.Создать(Фабрика.Тип(«http://api.vetrf.ru/schema/cdm/mercury/g2b/applications/v2», «ModifyEnterpriseRequest»));;

ApplicationDataWrapper.Добавить(ФормаXML.Элемент,»http://api.vetrf.ru/schema/cdm/mercury/g2b/applications/v2″, «ModifyEnterpriseRequest», modifyEnterpriseRequest);

Application.data = ApplicationDataWrapper;

Application.serviceId = «mercury-g2b.service:2.0»;

Application.issuerId = «******************»;

Application.issueDate = ТекущаяДата();

SubmitApplicationRequest.apiKey = «***********************»;

SubmitApplicationRequest.application = Application;

Результат = ПодключениеОбмена.submitApplicationRequest(SubmitApplicationRequest.apiKey, SubmitApplicationRequest.application);

Вылезает такая ошибка:

Несоответствие типов XDTO:

Тип ‘{http://api.vetrf.ru/schema/cdm/mercury/g2b/applications/v2}ModifyEnterpriseRequest’ не найден

Тип принадлежит пакету, отсутствующему в фабрике типов XDTO

Может кто подскажет, что я делаю не так ?


[Post New]21/11/2017 17:08:43

    

Тема: Интеграция с 1С

[Up]

RomanWBD

[Avatar]

Зарегистрирован: 12/05/2016 11:36:01
Сообщений: 23

Оффлайн



Все делаете так, а вот шлюз API 2.0 с тестовым Меркурием явно работает не так. Сейчас по этому сервису в ответе всегда возвращается ошибка по любому сервису из ams-mercury-g2b.service_v2.0_pilot.wsdl.


[Post New]21/11/2017 17:10:32

    

Тема: Интеграция с 1С

[Up]

FCool

Зарегистрирован: 21/11/2017 16:50:37
Сообщений: 3

Оффлайн


RomanWBD wrote:Все делаете так, а вот шлюз API 2.0 с тестовым Меркурием явно работает не так. Сейчас по этому сервису в ответе всегда возвращается ошибка по любому сервису из ams-mercury-g2b.service_v2.0_pilot.wsdl.

Использовать API v1 ?


[Post New]21/11/2017 17:11:46

    

Тема: Re:Интеграция с 1С

[Up]

Андрей Любимов

Зарегистрирован: 17/10/2017 16:58:56
Сообщений: 12

Оффлайн


FCool wrote:

Добрый день.

Результат = ПодключениеОбмена.submitApplicationRequest(SubmitApplicationRequest.apiKey, SubmitApplicationRequest.application);

Вылезает такая ошибка:

Несоответствие типов XDTO:

Тип ‘{http://api.vetrf.ru/schema/cdm/mercury/g2b/applications/v2}ModifyEnterpriseRequest’ не найден

Тип принадлежит пакету, отсутствующему в фабрике типов XDTO

Здравствуй! Операцию не получится сделать через прокси. У них в WS определении нет типов, связанных с операциями. Запрос нужно делать через HTTP.

Тут примерно описано: http://vetrf.ru/vetrf-forum/posts/listByUser/9167.page


[Post New]21/11/2017 17:11:55

    

Тема: Интеграция с 1С

[Up]

RomanWBD

[Avatar]

Зарегистрирован: 12/05/2016 11:36:01
Сообщений: 23

Оффлайн



1.4 вроде работает, проверял как раз после того как 2.0 перестал отправлять нормальные результаты.


[Post New]21/11/2017 17:26:35

    

Тема: Интеграция с 1С

[Up]

GusVal

Зарегистрирован: 10/11/2017 12:14:53
Сообщений: 176

Оффлайн



А API 2.0 насколько тестовое?

RomanWBD wrote:Все делаете так, а вот шлюз API 2.0 с тестовым Меркурием явно работает не так. Сейчас по этому сервису в ответе всегда возвращается ошибка по любому сервису из ams-mercury-g2b.service_v2.0_pilot.wsdl.

Вообще-то им бы следовало об этом большими буквами да на главной странице форума…


 

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Ошибка разбор слова корень
  • Ошибка разблокировки загрузчика xiaomi 1004