Revision 4175

View differences:

branches/v05/applications/appCatalogYNomenclatorClient/src/es/gva/cit/catalogClient/protocols/HTTPPostProtocol.java
72 72
            
73 73
        try {
74 74
            HttpURLConnection c = (HttpURLConnection) url.openConnection();
75
       
75
            
76
         c.setRequestProperty("SOAPAction","post");
76 77
         c.setRequestMethod("POST");
77
           c.setDoOutput(true);
78
         c.setDoOutput(true);
78 79
         c.setRequestProperty("Content-Type", "text/xml; charset=UTF-8");
79 80
         
80 81
        
branches/v05/applications/appCatalogYNomenclatorClient/src/es/gva/cit/gazetteer/idec/drivers/IDECGazetteerServiceDriver.java
132 132
        "</tns:getCoordenadesUTM>" +
133 133
        "</SOAP-ENV:Body>" +
134 134
        "</SOAP-ENV:Envelope>";
135
    		
135 136
    } 
136 137
    
137
    /**
138
     * It creates the XML for the getFeature request
139
     * @return Name-value pair with a XML request
140
     * @param query 
141
     */
142
        public String getPOSTGetFeature2(Query query) {        
143
        	String name = query.getName();
144
        	if (query.getOptions().getSearch().isWithAccents()){
145
        		name = Strings.removeAccents(name);
146
        	}    	
147
        		return "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" +
148
            "<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:si=\"http://soapinterop.org/xsd\" xmlns:tns=\"urn:idecwsdl\">" +
149
           	"<SOAP-ENV:Body><getCoordenadesUTM>" +
150
            "<key xsi:type=\"xsd:string\">CV81HP6</key>" +
151
            "<toponim xsi:type=\"xsd:string\">" + name + "</toponim>" +
152
            "</getCoordenadesUTM>" +
153
            "</SOAP-ENV:Body>" +
154
            "</SOAP-ENV:Envelope>";
155
        } 
138
    
156 139
/* (non-Javadoc)
157 140
     * @see es.gva.cit.gazetteer.drivers.IGazetteerServiceDriver#isProtocolSupported(java.net.URL)
158 141
     */
branches/v05/applications/appCatalogYNomenclatorClient/src/es/gva/cit/gazetteer/idec/parsers/IdecFeatureParser.java
64 64
    
65 65
        XMLNode[] nodeFeatures = XMLTree.searchMultipleNode(node,"SOAP-ENV:Body->ns1:getCoordenadesUTMResponse->return->item");
66 66
        Feature[] features = new Feature[nodeFeatures.length];
67
    
67
        
68
        //New Version
69
        if (features.length == 0){
70
        	nodeFeatures = XMLTree.searchMultipleNode(node,"soapenv:Body->multiRef");
71
        	features = new Feature[nodeFeatures.length];
72
        }
73
        
68 74
        for (int i=0 ; i<nodeFeatures.length ; i++){
69 75
            String id = XMLTree.searchNodeValue(nodeFeatures[i],"NOM");
70 76
            String name = id;
......
73 79
                Double.parseDouble(XMLTree.searchNodeValue(nodeFeatures[i],"Y")));
74 80
            features[i] = new Feature(id,name,description,point);
75 81
        }
82
        
76 83
    
77 84
    return features;
78 85
    } 

Also available in: Unified diff